/* ═══════════════════════════════════════════════════════════════
   VikaBu — style-extra.css
   Ergänzungen zu style.css.
   ═══════════════════════════════════════════════════════════════ */

/* ───────── Formel-Karten ───────── */
.formula-card {
  background: var(--bg-2);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: var(--space);
  margin: var(--space-sm) 0;
  font-family: "Cambria Math", "Latin Modern Math", Georgia, serif;
}
.formula-card .formula {
  font-size: 1.15rem;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.formula-card .formula-desc {
  color: var(--fg-muted);
  font-size: .9rem;
  font-family: system-ui, sans-serif;
}

/* ───────── Nächste Stunde (Dashboard) ───────── */
.next-lesson {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.next-lesson-fach {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.next-lesson-info {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.next-lesson-info .badge {
  font-size: .8rem;
  padding: 4px 10px;
}

/* ───────── Visualisierungen ───────── */
.viz-container {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space);
  margin: var(--space-sm) 0;
  overflow: hidden;
}
.viz-container svg,
.viz-container canvas {
  width: 100%;
  height: auto;
  display: block;
}

/* ───────── Onboarding: Theme-Dots kleiner ───────── */
.onboarding-card .theme-picker .theme-dot {
  padding: 6px;
  border-radius: 6px;
}
.onboarding-card .theme-picker .dot-color {
  width: 18px;
  height: 18px;
}
.onboarding-card .theme-picker .dot-label {
  font-size: .65rem;
}

/* ───────── Tutorial-Buttons ───────── */
.tutorial-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all .2s;
}
.tutorial-btn:hover {
  border-color: var(--accent);
  background: var(--bg-3);
}
.tutorial-btn .tutorial-emoji {
  font-size: 1.2rem;
}

.tutorial-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-sm) 0;
}

/* ───────── Sub-Tabs (kompakter) ───────── */
.sub-tabs.compact .sub-tab {
  padding: 6px 12px;
  font-size: .85rem;
}

.admin-sub-nav {
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-sm);
}

/* ───────── Stundenplan-Grid: bessere Zellen ───────── */
.sp-grid .sp-cell.sp-entry {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--accent-fg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform .15s;
}
.sp-grid .sp-cell.sp-entry:hover {
  transform: translateY(-1px);
}

/* ───────── Dashboard-Kacheln (kompakter) ───────── */
.dash-card + .dash-card {
  margin-top: var(--space);
}
.dash-card .card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
}

/* ───────── Menü-Kacheln: kleine Variante ───────── */
.menu-tile.small {
  padding: 12px;
  align-items: center;
  text-align: center;
}
.menu-tile.small .menu-emoji {
  font-size: 1.4rem;
}
.menu-tile.small .menu-title {
  font-size: .9rem;
}

/* ───────── Filter-Chips: verbesserte Haptik ───────── */
.chip {
  cursor: pointer;
  user-select: none;
}
.chip:active {
  transform: scale(0.97);
}

/* ───────── Modal: kompakter auf kleinen Screens ───────── */
@media (max-width: 480px) {
  .modal {
    max-width: none;
    width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    align-self: end;
  }
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
}

/* ───────── Fach-Kachel: Beschreibung ───────── */
.subject-tile .subject-sub {
  display: block;
  font-size: .75rem;
  color: var(--fg-muted);
  margin-top: 2px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* ───────── Admin-Modal: Formular-Labels als Block ───────── */
#adminModalBody form > label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: var(--space-sm);
}
#adminModalBody form > label > div {
  font-weight: 400;
}
#adminModalBody form > label > div > label {
  cursor: pointer;
  user-select: none;
}
#adminModalBody form > label > div > label:hover {
  color: var(--accent);
}
#adminModalBody form input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ───────── Kalender: bessere Zellen ───────── */
.cal-cell.today .cal-day {
  font-weight: 800;
}
.cal-cell.has-event {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* ───────── Erfolge: Animation ───────── */
.badge-tile.on .badge-icon {
  animation: badgePop 2.4s ease-in-out infinite;
}
@keyframes badgePop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* ───────── Notizen: Editor-Buttons ───────── */
.note-editor-body .modal-actions {
  margin-top: var(--space);
}

/* ───────── Suche: Sektionen ───────── */
.search-results .search-section-title {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--fg-muted);
  margin: var(--space-sm) var(--space-sm) 2px;
}

/* ───────── Info-Listen ───────── */
.info-list {
  list-style: none;
  padding: 0;
}
.info-list li {
  position: relative;
  padding-left: 22px;
  margin: 6px 0;
}
.info-list li::before {
  content: "•";
  position: absolute;
  left: 6px;
  color: var(--accent);
  font-weight: 800;
}

/* ───────── Danger-Card ───────── */
.danger-card {
  border-left: 4px solid var(--danger);
}
.danger-card .btn-danger {
  margin-top: var(--space-sm);
}

/* ───────── Admin: Section-Titel ───────── */
.admin-section-title {
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin-top: var(--space-lg);
}

/* ───────── Toast: mobile ───────── */
@media (max-width: 480px) {
  .backup-toast-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .backup-toast-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* ───────── FABs: Abstand auf kleinen Screens ───────── */
@media (max-width: 480px) {
  .notes-fab,
  .search-fab {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
}

/* ───────── Print ───────── */
@media print {
  .brand-header,
  .sub-tabs,
  .notes-fab,
  .search-fab,
  .backup-toast,
  .menu-grid,
  .icon-btn {
    display: none !important;
  }
  .app-shell { max-width: 100%; }
  .content { padding: 0; }
  body { background: #fff; color: #000; }
}

/* Fix 2026-11-06: Einrichtung auf dem Handy scrollbar machen,
   sonst ist „Fertig“ bei der Fächerauswahl nicht erreichbar. */
.onboarding-overlay { overflow-y: auto; -webkit-overflow-scrolling: touch; align-items: flex-start; }
.onboarding-card { margin: auto; }

/* ===== Nur für die Demo ===== */
#vbDemoBanner {
  position: fixed; left: 12px; bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 90; max-width: calc(100% - 24px);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 5px 5px 5px 12px; opacity: .92; border-radius: 999px;
  background: #111827; color: #f3f4f6; font: 13px/1.3 system-ui, sans-serif;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
#vbDemoBanner button {
  border: 0; border-radius: 999px; padding: 6px 12px; min-height: 32px; cursor: pointer;
  background: #374151; color: #fff; font: 600 12px system-ui, sans-serif;
}
.platzhalter { max-width: 560px; margin: 40px auto; text-align: center; }
.platzhalter .emoji { font-size: 48px; }
