/* ==============================
   STICKY WIDGET — CORE LAYOUT
   ============================== */

.sticky-widget{
  display: grid;
  gap: 14px;
  justify-items: center;
}

/* sticky note box */
.sticky-widget .sticky_note{
  position: relative;
  display: grid;
  place-items: center;
  background: url('/plugins/idea_grid/sticky/backgrounds/stickynote5.png') no-repeat center/contain;
  width: 100%;
  max-width: 600px;
  min-height: 600px;
  margin: 0 auto;
}

/* + button centered on note */
.sticky-widget .sticky-toggle{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;

  font-size: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: none;
  background: #6e8fff;
  color: #fff;
  cursor: pointer;
  transition: transform .2s ease;
}
.sticky-widget .sticky-toggle:hover{
  transform: translate(-50%, -50%) scale(1.08);
}

.sticky-widget .hidden{
  display: none !important;
}

/* ==============================
   COMPOSE AREA
   ============================== */

.sticky-widget .make_note_group{
  width: 75%;
  padding: 24px 22px 16px;
  z-index: 10;
}

.sticky-widget .sticky_note_text_wrapper{
  width: 100%;
  color: #121524 !important;
}

/* ==============================
   TEXT + PLACEHOLDER (ALIGNED)
   ============================== */

/* tweak this ONE value to move text up/down on sticky */
:root{
  --sticky-text-top: 1.2rem;
}

.sticky-widget .sticky_note_text{
  position: relative;
  width: 100%;
}

/* shared typography */
.sticky-widget .sticky_note_text,
.sticky-widget textarea.js-sticky-content,
.sticky-widget .sticky-placeholder{
  font-family: "anthem";
  font-size: 1.5em;
  line-height: 1.25;
  text-align: center;
}

/* textarea */
.sticky-widget textarea.js-sticky-content{
  width: 75%;
  min-height: 260px;

  background: transparent;
  border: none;
  outline: none;
  resize: none;

  color: #121524 !important;
  caret-color: #121524;

  /* defines first typing line */
  padding: var(--sticky-text-top) 1rem 0;
  box-sizing: border-box;
}

/* disable native placeholder completely */
.sticky-widget textarea.js-sticky-content::placeholder{
  opacity: 0;
}

/* placeholder overlay — SAME LINE as textarea text */
.sticky-widget .sticky-placeholder{
  position: absolute;
  left: 0;
  right: 0;
  top: var(--sticky-text-top);
  padding: 0 1rem;

  color: rgba(18,21,36,.75);
  cursor: text;
  user-select: none;

  opacity: 0;
  transform: translateY(10px);
  filter: blur(6px);
  pointer-events: none;

  transition:
    opacity .28s ease,
    transform .28s ease,
    filter .28s ease;
}

/* show placeholder */
.sticky-widget .sticky_note_text.show-placeholder .sticky-placeholder{
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  pointer-events: auto;
}

/* hide placeholder */
.sticky-widget .sticky_note_text.hide-placeholder .sticky-placeholder{
  opacity: 0;
  transform: translateY(-8px);
  filter: blur(2px);
  pointer-events: none;
}

/* ==============================
   SWATCHES
   ============================== */

.sticky-widget .sticky_swatches_wrapper{
  display: flex;
  align-items: center;
  gap: .35rem;

  width: 100%;
  max-width: 600px;
  padding: .25rem;
}

.sticky-widget .scrollable_swatches{
  display: flex;
  align-items: center;
  gap: .35rem;

  overflow-x: auto;
  scroll-behavior: smooth;
  padding: .25rem;
  scrollbar-width: none;
}
.sticky-widget .scrollable_swatches::-webkit-scrollbar{
  display: none;
}

.sticky-widget .sticky_swatch{
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex: 0 0 auto;

  border: 2px solid transparent;
  border-radius: 10px;
  padding: 2px;

  transition: transform .15s ease, border-color .15s ease;
  opacity: 1;
}
.sticky-widget .sticky_swatch.is-selected{
  border-color: #96bce3;
}

/* scroll buttons */
.sticky-widget .swatch_scroll_button{
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  padding: .25rem .35rem;
  border-radius: 999px;
  line-height: 1;
}
.sticky-widget .swatch_scroll_button:hover{
  background: rgba(255,255,255,.12);
}

/* ==============================
   ACTION BUTTON
   ============================== */

.sticky_send_to_grid{
  appearance: none;
  border: 1px solid var(--color-border);
  background: green;
  color: white;
  border-radius: 999px;
  padding: .6rem 1.4rem;
  font-family: "askwhy";
  font-size: 1rem;
  text-transform: uppercase;
  cursor: pointer;

  transition:
    background .15s ease,
    transform .12s ease,
    box-shadow .12s ease,
    opacity .12s ease;
}

/* ==============================
   MOBILE
   ============================== */

@media (max-width: 700px){
  .sticky-widget .sticky_note{
    max-width: 92vw;
    min-height: 420px;
  }
  .sticky-widget .sticky_swatches_wrapper{
    max-width: 92vw;
  }
}
