/* =========================================================
   Astracel – Navbar Sky's Notes
   ========================================================= */

/* =========================================================
   Sky's Notes icon button
   ========================================================= */

.notes-button{
  display:flex;
  align-items:center;
  justify-content:center;

  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);

  transition:
    background .20s ease,
    border-color .20s ease,
    color .20s ease,
    box-shadow .20s ease,
    transform .14s ease;
}

.notes-button:hover{
  background: var(--panel-hover);
  border-color: color-mix(in srgb, var(--panel-border) 60%, #fff 40%);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.38);
}

.notes-icon{
  font-size: 18px;
  line-height: 1;
}

/* Keyboard accessibility */
.notes-button:focus-visible,
.notes-close:focus-visible,
.notes-tab-btn:focus-visible,
.notes-scroll-btn:focus-visible{
  outline: 2px solid transparent;
  box-shadow:
    0 0 0 2px var(--accent-focus),
    0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--panel-border) 50%, #fff 50%);
}

/* =========================================================
   Sky's Notes Modal
   ========================================================= */

/* Backdrop */
.notes-backdrop{
  position: fixed;
  inset: 0;
  z-index: 3000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;

  background: rgba(4, 6, 10, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  opacity: 0;
  pointer-events: none;
  transition: opacity .20s ease;
}

.notes-backdrop.is-open{
  opacity: 1;
  pointer-events: auto;
}

/* Prevent background scroll when modal is open */
body.notes-open{
  overflow: hidden;
}

/* Modal panel */
.notes-modal{
  width: min(980px, 100%);
  height: min(84vh, calc(100vh - 48px));

  background: linear-gradient(
      135deg,
      rgba(255,255,255,0.10),
      rgba(255,255,255,0.03)
  );
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 22px 60px rgba(0,0,0,0.60);

  padding: 18px 20px 20px;
  display:flex;
  flex-direction:column;
  overflow: hidden;
}

/* Modal header */
.notes-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  flex: 0 0 auto;
}

.notes-header h2{
  margin: 0;
  font-size: clamp(18px, 2.1vw, 24px);
  letter-spacing: .4px;
}

.notes-header p{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* Close button */
.notes-close{
  background: transparent;
  border-radius: 999px;
  border: 1px solid transparent;
  width: 32px;
  height: 32px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  transition:
    color .18s ease,
    background .18s ease,
    border-color .18s ease,
    transform .14s ease;
}

.notes-close:hover{
  color: var(--accent);
  background: rgba(0,0,0,0.35);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

/* =========================================================
   Sky's Notes horizontal tabs
   ========================================================= */

.notes-tabs-shell{
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;

  flex: 0 0 auto;
  margin-top: 12px;
}

.notes-tabs-wrap{
  min-width: 0;
  overflow: hidden;
}

/* Invisible horizontal scroller */
.notes-tabs{
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;

  overflow-x: auto;
  overflow-y: visible;
  white-space: nowrap;

  padding: 6px 4px 10px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.notes-tabs::-webkit-scrollbar{
  display: none;
}

/* Side scroll buttons */
.notes-scroll-btn{
  width: 34px;
  height: 34px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor: pointer;

  font-size: 22px;
  line-height: 1;
  font-weight: 900;

  box-shadow: 0 8px 20px rgba(0,0,0,0.24);

  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    opacity .18s ease,
    transform .14s ease;
}

.notes-scroll-btn:hover{
  background: rgba(255,255,255,0.10);
  border-color: color-mix(in srgb, var(--panel-border) 60%, #fff 40%);
  color: var(--accent);
  transform: translateY(-1px);
}

.notes-scroll-btn:disabled{
  opacity: .28;
  cursor: not-allowed;
  transform: none;
  color: var(--muted);
}

.notes-tab-btn{
  appearance: none;
  flex: 0 0 auto;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--muted);

  font-weight: 800;
  letter-spacing: .2px;
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;

  font-size: 13px;
  line-height: 1;

  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .12s ease;
}

.notes-tab-btn:hover{
  color: var(--text);
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.28);
  transform: translateY(-1px);
}

.notes-tab-btn.is-active{
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 65%, rgba(255,255,255,0.20));
  background: color-mix(in srgb, var(--accent) 18%, rgba(255,255,255,0.05));
}

/* Subtle underline */
.notes-tab-underline{
  position: absolute;
  left: 4px;
  bottom: 4px;
  height: 2px;
  width: 0;
  border-radius: 999px;
  background: var(--accent);
  opacity: .9;
  transform: translateX(0);
  transition:
    transform 380ms cubic-bezier(.2,.9,.2,1),
    width 380ms cubic-bezier(.2,.9,.2,1);
}

.notes-tab-underline.no-anim{
  transition: none !important;
}

/* =========================================================
   Sky's Notes sliding content area
   ========================================================= */

/*
   The modal has a real height.
   .notes-body fills the remaining space.
   Each .notes-tab-panel scrolls separately.
*/

.notes-body{
  margin-top: 10px;
  padding-right: 0;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
}

.notes-tabs-stage{
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.notes-tabs-stage[data-ready="0"] .notes-tabs-viewport{
  visibility: hidden;
}

.notes-tabs-viewport{
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 14px;
}

.notes-tabs-track{
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: stretch;
  transform: translate3d(0,0,0);
  transition: transform 520ms cubic-bezier(.2,.9,.2,1);
  will-change: transform;
}

.notes-tabs-track.no-anim{
  transition: none !important;
}

.notes-tab-panel{
  flex: 0 0 auto;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 8px 2px 2px;
  scrollbar-width: thin;
}

.notes-tab-panel::-webkit-scrollbar{
  width: 6px;
}

.notes-tab-panel::-webkit-scrollbar-thumb{
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 70%, transparent);
}

.notes-tab-panel::-webkit-scrollbar-track{
  background: transparent;
}

.notes-empty{
  margin: 4px 0;
  color: var(--muted);
  font-size: 14px;
}

/* Note cards */
.notes-card{
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  margin-bottom: 10px;
}

.notes-card-title{
  margin: 0 0 6px 0;
  font-size: 15px;
  letter-spacing: .3px;
}

.notes-card-content{
  display: block;
  width: 100%;
}

/* Unified list for bullets + images */
.notes-card-list{
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.55;
}

/* Standard bullet items */
.notes-card-list li{
  margin-bottom: 4px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notes-text-item{
  list-style: disc;
}

/* =========================================================
   Inner note blocks from:
   📄 - Block title
   📄 #- Inner bullet
   ========================================================= */

.notes-nested-card,
.notes-category{
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;

  margin: 10px 0 8px 0 !important;
  padding: 10px 12px !important;

  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,0.025) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03) !important;
}

.notes-card-list + .notes-nested-card,
.notes-card-list + .notes-category{
  margin-top: 10px !important;
}

.notes-nested-title,
.notes-category-title{
  display: block !important;
  margin: 0 0 6px 0 !important;
  padding: 0 !important;

  font-size: 15px !important;
  line-height: 1.35 !important;
  color: var(--muted) !important;
  letter-spacing: .3px !important;
  font-weight: 700 !important;
}

.notes-nested-list,
.notes-category-items{
  display: block !important;
  margin: 0 !important;
  padding: 0 0 0 20px !important;

  line-height: 1.55 !important;
  font-size: 14px !important;
}

.notes-nested-list li,
.notes-category-items li{
  margin: 0 0 6px 0 !important;
  padding-left: 0 !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Image item inside the list */
.notes-image-item{
  list-style: none;
  margin: 8px 0 4px;
  padding-left: 0;
}

.notes-nested-list .notes-image-item,
.notes-category-items .notes-image-item{
  margin-left: -20px;
}

/* Image styling: not too big, fits modal nicely */
.notes-image{
  display:block;
  max-width: 260px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 26px rgba(0,0,0,0.45);
  object-fit: cover;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .notes-tabs-track,
  .notes-tab-underline,
  .notes-button,
  .notes-close,
  .notes-tab-btn,
  .notes-scroll-btn{
    transition: none !important;
  }

  .notes-tabs{
    scroll-behavior: auto;
  }
}

/* Small screens */
@media (max-width: 780px){
  .notes-modal{
    width: 100%;
    height: min(86vh, calc(100vh - 28px));
    padding: 14px 14px 16px;
  }

  .notes-tabs-shell{
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    gap: 6px;
  }

  .notes-scroll-btn{
    width: 30px;
    height: 30px;
    font-size: 20px;
  }

  .notes-image{
    max-width: 220px;
  }

  .notes-tab-btn{
    font-size: 12px;
    padding: 7px 10px;
  }
}

@media (max-width: 480px){
  .notes-backdrop{
    padding: 14px;
  }

  .notes-header{
    gap: 8px;
  }

  .notes-header p{
    font-size: 12px;
  }

  .notes-card{
    padding: 9px 10px;
  }

  .notes-card-list,
  .notes-nested-list,
  .notes-category-items{
    font-size: 13px !important;
  }
}