/* Hide side widgets while mobile menu is open */
body.nav-open .widget-dock {
  visibility: hidden;
  pointer-events: none;
}

/* Side widgets — smooth slide from left */
.widget-dock {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 85;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
  max-height: calc(100vh - 100px);
}

.widget-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
  padding: 8px 0;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.widget-tab {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  padding: 12px 9px;
  border: 0;
  border-radius: 0 12px 12px 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  color: #0f172a;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, filter 0.25s ease;
  box-shadow: 2px 0 14px rgba(15, 23, 42, 0.14);
}

.widget-tab-thought { background: linear-gradient(180deg, #fef08a, #fde047); border: 1px solid #eab308; }
.widget-tab-holiday { background: linear-gradient(180deg, #bfdbfe, #93c5fd); border: 1px solid #60a5fa; }
.widget-tab-trending { background: linear-gradient(180deg, #fecdd3, #fda4af); border: 1px solid #f43f5e; }
.widget-tab-admissions { background: linear-gradient(180deg, #bbf7d0, #86efac); border: 1px solid #22c55e; }
.widget-tab-notice { background: linear-gradient(180deg, #e9d5ff, #d8b4fe); border: 1px solid #a855f7; }

.widget-tab:hover {
  transform: rotate(180deg) translateX(3px);
  filter: brightness(1.03);
}

.widget-tab.active {
  box-shadow: 4px 0 18px rgba(15, 23, 42, 0.24);
  transform: rotate(180deg) translateX(4px);
}

.widget-panel-slot {
  position: relative;
  width: 0;
  overflow: visible;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  align-self: center;
}

.widget-dock.has-open .widget-panel-slot {
  width: min(320px, calc(100vw - 58px));
}

.widget-panel {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-108%, -50%) scale(0.94);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.45s ease,
    visibility 0s linear 0.55s;
  will-change: transform, opacity;
}

.widget-panel.is-open {
  transform: translate(0, -50%) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.45s ease,
    visibility 0s;
  z-index: 3;
}

.sticky-note {
  width: min(320px, calc(100vw - 58px));
  border-radius: 0 16px 16px 0;
  padding: 16px 18px;
  box-shadow: 8px 0 32px rgba(15, 23, 42, 0.2);
  max-height: min(380px, calc(100vh - 120px));
  overflow-y: auto;
}

.thought-widget .sticky-note { background: linear-gradient(165deg, #fffbeb, #fef08a); border: 1px solid #eab308; }
.holiday-widget .sticky-note { background: linear-gradient(165deg, #eff6ff, #dbeafe); border: 1px solid #60a5fa; }
.trending-widget .sticky-note { background: linear-gradient(165deg, #fff1f2, #fecdd3); border: 1px solid #f43f5e; }
.admissions-widget .sticky-note { background: linear-gradient(165deg, #ecfdf5, #bbf7d0); border: 1px solid #22c55e; }
.notice-widget .sticky-note { background: linear-gradient(165deg, #faf5ff, #e9d5ff); border: 1px solid #a855f7; }

.sticky-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.12);
}

.sticky-kicker {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}

.thought-widget .sticky-kicker { color: #92400e; }
.holiday-widget .sticky-kicker { color: #1e40af; }
.trending-widget .sticky-kicker { color: #9f1239; }
.admissions-widget .sticky-kicker { color: #166534; }
.notice-widget .sticky-kicker { color: #6b21a8; }

.widget-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.1);
  color: #0f172a;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.widget-close:hover {
  background: rgba(15, 23, 42, 0.18);
  transform: rotate(90deg) scale(1.08);
}

#thoughtText {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #422006;
  font-weight: 600;
}

.thought-day { margin: 8px 0 0; font-size: 0.72rem; color: #78350f; }

.holiday-next-label,
.widget-label {
  margin: 0 0 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.holiday-widget .holiday-next-label { color: #1e3a8a; }

#holidayNextDate {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
}

#holidayNextName {
  margin: 2px 0 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e3a8a;
  line-height: 1.35;
}

.holiday-list,
.widget-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}

.holiday-list li,
.widget-list li {
  padding: 8px 0;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.12);
  font-size: 0.84rem;
  line-height: 1.4;
}

.holiday-list li:last-child,
.widget-list li:last-child { border-bottom: 0; }

.holiday-date { font-weight: 700; color: #1e40af; display: block; }
.holiday-name { color: #334155; }

.trending-item {
  display: block;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(159, 18, 57, 0.2);
  color: #881337;
  text-decoration: none;
  transition: transform 0.2s ease, color 0.2s ease;
}

.trending-item:hover {
  color: #4c0519;
  transform: translateX(4px);
}

.trending-item strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.trending-item span {
  font-size: 0.78rem;
  opacity: 0.85;
}

.widget-cta {
  display: inline-flex;
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--grad-1, linear-gradient(135deg, #0b153a, #0f766e));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.widget-cta:hover { transform: translateY(-2px); }

.widget-facts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.widget-facts li {
  padding: 6px 0;
  font-size: 0.84rem;
  color: #334155;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.1);
}

.widget-facts li:last-child { border-bottom: 0; }
.widget-facts strong { color: #0f172a; }

.fade-swap {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .widget-panel,
  .widget-panel-slot,
  .widget-tab,
  .widget-close {
    transition: none;
  }
}

@media (max-width: 640px) {
  .widget-dock {
    top: auto;
    bottom: 76px;
    transform: none;
  }

  .widget-panel {
    top: auto;
    bottom: 0;
    transform: translate(-108%, 0) scale(0.94);
  }

  .widget-panel.is-open {
    transform: translate(0, 0) scale(1);
  }

  .widget-dock.has-open .widget-panel-slot {
    width: min(290px, calc(100vw - 50px));
  }
}
