.notebook{
  min-width: 400px;
  width: 100%;
  height: 600px;

  background:
    radial-gradient(140% 120% at 50% 0%,
      rgba(255,255,255,.22) 0%,
      rgba(var(--surface-rgb), 0.22) 48%,
      rgba(var(--surface-rgb), 0.14) 100%
    );

  box-shadow:
    0 18px 45px rgba(22,36,58,.55),
    inset 0 1px 0 rgba(255,255,255,.35);

  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  padding: .5rem;
  border-radius: 25px;
}


/* ===========================
   NOTEBOOK TITLE
   =========================== */
.notebook_title input.notebook_title {
  display: block;
  width: 80%;
  border: none;
  background: transparent;
  font-family: "anthem";
  font-size: 2.5em;
  text-align: center;
  color: black !important;
  margin: 5% auto;
}

.notebook_title input.notebook_title:focus {
  outline: none;
  animation: popIn 0.25s ease;
}

.notebook_title input.notebook_title:placeholder {
    color: white;
}

/* Hide placeholder when focused on notebook title */
.notebook_title input.notebook_title:focus::placeholder {
  color: black;
  transition: color 0.3s ease;
}

@keyframes popIn {
  0% { transform: scale(0.95); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

/* ===========================
   CONTENT AREA
   =========================== */
.notebook_scroll_area {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}
.notebook_scroll_area::-webkit-scrollbar { display: none; }

.notebook_content_wrapper {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  width: 90%;
}

.input_content_wrapper {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  width: 90%;
}

/* ===========================
   FOOTER
   =========================== */
.notebook_footer {
  flex-shrink: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  }

/* Input row (hidden until toggle) */
.list_item_input.hidden {
  display: none;
}

.list_item_input {
  display: flex;
  text-align: left !important;
  gap: .5rem;
  transition: all 0.25s ease;
border-bottom: 1px solid rgba(56,76,101,.25);
margin-top: 1em;
}

/* Real input */
.list_item_input input.list_item_input {
  flex: 1;
  max-width: 100%;
  border: none;
  background: transparent;
  font-family: "loubag";
  font-size: 1em;
  padding: .25em .5em;
  color: black;
  text-align: center;
  z-index: 2;
}

.list_item_input input.list_item_input:focus {
  outline: none;
}

/* Hide placeholder when focused on add-item input */
.list_item_input input.list_item_input:focus::placeholder {
  color: transparent;
    transition: color 0.3s ease;

}

.add_item_button{
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;

  display: grid;
  place-items: center;   /* ⭐ THIS */

  font-size: 18px;
  line-height: 1;
  font-family: system-ui, sans-serif; /* avoids funky glyphs */
margin-top: 1em;
  background: #6e8fff;
  color: #fff;
}

.add_item_button:hover { transform: scale(1.1); }

/* Center the big + button inside notebook when visible */
.notebook-toggle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 2rem;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  background: #6e8fff;
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.notebook-toggle:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

/* ===========================
   LIST ITEMS
   =========================== */
.list_item {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .25rem .5rem;
  transition: background-color .15s ease;
  margin: 0 auto;
}
.list_item_text {
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  text-align: left;
}
.list_item_text:focus { outline: none; }

.list_item.is-animating {
  box-sizing: border-box;
  overflow: hidden;
  transition:
    height .24s ease,
    margin .24s ease,
    padding .24s ease,
    opacity .18s ease,
    transform .18s ease;
}
.list_item.collapse {
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0;
  transform: translateX(-6px);
}
.list_item:hover { background: rgba(56,76,101,.06); border-radius: 8px; }

/* ===========================
   DELETE BUTTON
   =========================== */
.list_item_delete_button {
  position: absolute;
  right: .25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, background-color .15s ease;
  cursor: pointer;
  color: #fff;
  background: rgba(56,76,101,0);
}
.list_item:hover .list_item_delete_button {
  opacity: 1;
  pointer-events: auto;
  background: rgba(56,76,101,.25);
}
.list_item_delete_button:hover { background: rgba(56,76,101,.35); }
.list_item_delete_button::before {
  content: "✕";
  font-size: 14px;
  line-height: 1;
}

/* ===========================
   BULLETS
   =========================== */
.bullet_point { cursor: pointer; }
.custom-bullet {
  display: inline-block;
  width: 30px;
  height: 30px;
  background-size: contain;
  background-repeat: no-repeat;
  vertical-align: middle;
  margin-left: 0 !important;
}

/* ===========================
   DELETE BUTTON
   =========================== */
.delete-item-btn {
  position: absolute;
  right: .25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, background-color .15s ease;
  cursor: pointer;
  color: #fff;
  background: rgba(56,76,101,0);
}
.list_item:hover .delete-item-btn {
  opacity: 1;
  pointer-events: auto;
  background: rgba(56,76,101,.25);
}
.delete-item-btn:hover { background: rgba(56,76,101,.35); }
.delete-item-btn::before {
  content: "✕";
  font-size: 14px;
  line-height: 1;
}

/* ===========================
   CONTROL PANEL
   =========================== */
.notebook_control_panel {
  margin-top: 1em;
  padding: 1em;
  border-radius: 10px;
  justify-content: center;
  text-align: center;
}
.notebook_controls_label {
  color: white;
  font-size: .75em;
  margin: .25em;
}

/* ===========================
   BULLET POPOVER
   =========================== */
.bullet-popover { 
  display: none;
  position: fixed;
  gap: .35rem;
  padding: .4rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  z-index: 10000;
}
.bullet-popover.open {
  display: grid;
  grid-template-columns: repeat(5, 30px);
  gap: 6px;
  max-width: fit-content;
}
.bullet-choice {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 2px solid transparent;
  background: transparent;
  padding: 0; margin: 2px;
  display: inline-block;
  cursor: pointer;
}
.bullet-choice .custom-bullet { width: 100%; height: 100%; display: block; }
.bullet-choice[aria-current="true"] { border-color: #96bce3; }

/* ===========================
   BULLET BACKGROUNDS
   =========================== */
.bullet-style-1 { background-image:url('/plugins/idea_grid/notebook/bullets/bullet1.png'); }
.bullet-style-2 { background-image:url('/plugins/idea_grid/notebook/bullets/bullet2.png'); }
.bullet-style-3 { background-image:url('/plugins/idea_grid/notebook/bullets/bullet3.png'); }
.bullet-style-4 { background-image:url('/plugins/idea_grid/notebook/bullets/bullet4.png'); }
.bullet-style-5 { background-image:url('/plugins/idea_grid/notebook/bullets/bullet5.png'); }
.bullet-style-6 { background-image:url('/plugins/idea_grid/notebook/bullets/bullet6.png'); }
.bullet-style-7 { background-image:url('/plugins/idea_grid/notebook/bullets/bullet7.png'); }
.bullet-style-8 { background-image:url('/plugins/idea_grid/notebook/bullets/bullet8.png'); }
.bullet-style-9 { background-image:url('/plugins/idea_grid/notebook/bullets/bullet9.png'); }
.bullet-style-10{ background-image:url('/plugins/idea_grid/notebook/bullets/bullet10.png'); }
.bullet-style-11{ background-image:url('/plugins/idea_grid/notebook/bullets/bullet11.png'); }
.bullet-style-12{ background-image:url('/plugins/idea_grid/notebook/bullets/bullet12.png'); }
.bullet-style-13{ background-image:url('/plugins/idea_grid/notebook/bullets/bullet13.png'); }
.bullet-style-14{ background-image:url('/plugins/idea_grid/notebook/bullets/bullet14.png'); }
.bullet-style-15{ background-image:url('/plugins/idea_grid/notebook/bullets/bullet15.png'); }
.bullet-style-16{ background-image:url('/plugins/idea_grid/notebook/bullets/bullet16.png'); }
.bullet-style-17{ background-image:url('/plugins/idea_grid/notebook/bullets/bullet17.png'); }
.bullet-style-18{ background-image:url('/plugins/idea_grid/notebook/bullets/bullet18.png'); }
.bullet-style-19{ background-image:url('/plugins/idea_grid/notebook/bullets/bullet19.png'); }
.bullet-style-20{ background-image:url('/plugins/idea_grid/notebook/bullets/bullet20.png'); }


/* ===========================
   RESPONSIVE SAFETY LAYER
   (doesn't change your desktop math)
   =========================== */

/* Let notebook shrink on smaller screens */
.notebook{
  width: 500px;              /* preserves your current layout */
  max-width: 500px;
  min-width: 0;              /* ✅ overrides the mobile overflow problem */
}

/* Mobile / narrow screens */
@media (max-width: 560px){
  .notebook{
    width: min(500px, 92vw); /* shrink to screen */
    height: auto;            /* let it breathe */
    min-height: 560px;       /* keeps the paper feel */
    padding: .75rem;         /* slightly tighter */
    background-size: 100% 100%; /* keeps art aligned, avoids weird contain gaps */
  }

  /* make content usable (not too skinny) */
  .notebook_content_wrapper,
  .input_content_wrapper{
    width: 86%;
  }

  /* title: still centered, but not cramped */
  .notebook_title input.notebook_title{
    width: 78%;
    font-size: 2.1em;
    margin: 6% auto 4%;
  }
}

/* Very small phones */
@media (max-width: 380px){
  .notebook{
    width: 94vw;
    min-height: 520px;
  }

  .notebook_content_wrapper,
  .input_content_wrapper{
    width: 90%;
  }

  .notebook_title input.notebook_title{
    width: 84%;
    font-size: 1.9em;
  }
}

/* ===========================
   FORCE ALL NOTEBOOK TEXT WHITE
   =========================== */

/* All text inside notebook */
.notebook,
.notebook *{
  color: #ffffff !important;
  caret-color: #ffffff !important;
}

/* All inputs & textareas */
.notebook input,
.notebook textarea{
  color: #ffffff !important;
  caret-color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important; /* Safari */
}

/* All placeholders (every browser) */
.notebook input::placeholder,
.notebook textarea::placeholder{
  color: #ffffff !important;
  opacity: 1 !important;
}

.notebook input::-webkit-input-placeholder,
.notebook textarea::-webkit-input-placeholder{
  color: #ffffff !important;
}

.notebook input::-moz-placeholder,
.notebook textarea::-moz-placeholder{
  color: #ffffff !important;
}

.notebook input:-ms-input-placeholder,
.notebook textarea:-ms-input-placeholder{
  color: #ffffff !important;
}

/* Contenteditable text (list items, titles, etc.) */
.notebook [contenteditable],
.notebook [contenteditable="true"]{
  color: #ffffff !important;
  caret-color: #ffffff !important;
}
