/* Dashboard sizing and Sonare motion polish. */

.schedule-panel {
  display: flex;
  flex-direction: column;
}

#currentStudentCard,
#upcomingStudentCard {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-height: 310px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: inherit;
  text-align: initial;
}

#currentStudentCard > .schedule-student-card,
#upcomingStudentCard > .schedule-student-card {
  flex: 1 1 auto;
  width: 100%;
  min-height: 100%;
  height: 100%;
  padding: clamp(1.15rem, 2.2vw, 1.65rem);
  align-content: start;
}

#currentStudentCard > .schedule-empty,
#upcomingStudentCard > .schedule-empty {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 100%;
  height: 100%;
  padding: clamp(2rem, 5vw, 4rem) 1.5rem;
  overflow: hidden;
  border: 1px dashed rgba(108, 75, 158, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 42%, rgba(180, 154, 232, 0.16), transparent 9rem),
    linear-gradient(145deg, rgba(250, 248, 253, 0.96), rgba(245, 241, 250, 0.7));
  color: #766d7f;
  isolation: isolate;
}

#currentStudentCard > .schedule-empty::before,
#upcomingStudentCard > .schedule-empty::before {
  content: none;
}

#currentStudentCard > .schedule-empty .schedule-music-mark,
#upcomingStudentCard > .schedule-empty .schedule-music-mark {
  width: 48px;
  height: 48px;
  padding: 0;
  background: transparent;
  color: var(--accent);
  filter: drop-shadow(0 8px 12px rgba(65, 43, 91, 0.12));
}

#currentStudentCard > .schedule-empty span,
#upcomingStudentCard > .schedule-empty span {
  max-width: 25rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.sonare-logo-svg {
  display: block;
  width: 38px;
  height: 38px;
  overflow: visible;
}

.sonare-logo-bar {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 260ms cubic-bezier(.2, .75, .25, 1);
}

.sonare-logo-bar--ink {
  fill: var(--brand-ink);
}

.sonare-logo-bar--lilac {
  fill: var(--brand-lilac);
}

.sonare-logo-bar:hover,
.sonare-brand:focus-visible .sonare-logo-bar {
  transform: translateY(-5px);
}
html[data-theme="dark"] .sonare-logo-svg { content: normal; }

.topbar .tab.sonare-tab-arriving {
  animation: sonareTabFlick 260ms cubic-bezier(.2, .75, .25, 1);
}

.panel.sonare-panel-from-right {
  animation: sonarePanelFromRight 330ms cubic-bezier(.2, .75, .25, 1);
}

.panel.sonare-panel-from-left {
  animation: sonarePanelFromLeft 330ms cubic-bezier(.2, .75, .25, 1);
}

.schedule-student-card.is-opening {
  pointer-events: none;
  animation: sonareCardOpen 260ms cubic-bezier(.2, .75, .25, 1) both;
}

#studentFormWrapper.student-modal-enter .student-modal-card {
  animation: sonareWorkspaceOpen 420ms cubic-bezier(.16, .8, .25, 1) both;
  transform-origin: 50% 12%;
}

html[data-theme="dark"] .sonare-logo-bar--ink {
  fill: #fff;
}

html[data-theme="dark"] #currentStudentCard > .schedule-empty,
html[data-theme="dark"] #upcomingStudentCard > .schedule-empty {
  background:
    radial-gradient(circle at 50% 42%, rgba(180, 154, 232, 0.14), transparent 9rem),
    linear-gradient(145deg, #1c2129, #171b21);
  border-color: rgba(180, 154, 232, 0.24);
}

html[data-theme="dark"] #currentStudentCard > .schedule-empty .schedule-music-mark,
html[data-theme="dark"] #upcomingStudentCard > .schedule-empty .schedule-music-mark {
  background: rgba(255, 255, 255, 0.06);
}

@keyframes sonareTabFlick {
  0% { opacity: 0.62; transform: translateX(var(--sonare-tab-offset, 7px)) scale(0.98); }
  70% { transform: translateX(-1px) scale(1.012); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes sonarePanelFromRight {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes sonarePanelFromLeft {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes sonareCardOpen {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  55% { opacity: 1; transform: translateY(-3px) scale(1.012); box-shadow: 0 24px 48px rgba(65, 43, 91, 0.16); }
  100% { opacity: 0; transform: translateY(-2px) scale(1.025); }
}

@keyframes sonareWorkspaceOpen {
  from { opacity: 0; transform: translateY(18px) scale(0.988); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 760px) {
  #currentStudentCard,
  #upcomingStudentCard {
    min-height: 250px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sonare-logo-bar,
  .topbar .tab.sonare-tab-arriving,
  .panel.sonare-panel-from-right,
  .panel.sonare-panel-from-left,
  .schedule-student-card.is-opening,
  #studentFormWrapper.student-modal-enter .student-modal-card {
    animation: none !important;
    transition: none !important;
  }
}

/* One persistent selection pill moves between the navigation buttons. */
.topbar .tabs.sonare-sliding-tabs { position: relative; isolation: isolate; }
.topbar .sonare-nav-selection {
  position: absolute; left: 0; top: 0; pointer-events: none; z-index: -1;
  border-radius: 9px; background: var(--accent-soft);
  border: 1px solid rgba(108,75,158,.18);
  transition: transform 340ms cubic-bezier(.2,.8,.2,1), width 340ms cubic-bezier(.2,.8,.2,1), height 180ms ease;
}
.topbar .sonare-sliding-tabs .tab.active,
.topbar .sonare-sliding-tabs .tab.active:hover {
  background: transparent; border-color: transparent; box-shadow: none;
}
.topbar .sonare-sliding-tabs .tab.sonare-tab-arriving { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .topbar .sonare-nav-selection { transition: none; }
}
