/* gos-sms: kleine Ergaenzungen zum KMS-Stylesheet (style.css) */
.header .logo img { max-height: 26px; margin-right: 6px; }
.avatar-initials {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(150deg, var(--color-primary) 0%, var(--color-primary-strong) 100%);
  color: #fff; font-weight: 700;
}
.nav-profile button.dropdown-item { background: none; border: 0; width: 100%; text-align: left; }
.group-table th { white-space: nowrap; }
.group-table tr.table-own td { background-color: rgba(246, 143, 102, 0.10); }
.public-page .logo img { max-height: 42px; margin-right: 10px; }
.public-page .logo span { font-size: 26px; font-weight: 700; color: var(--color-text); }
.footer { padding: 20px 30px; margin-top: 20px; }
.info-card h6 { font-size: 28px; font-weight: 700; }
tr[hidden] { display: none; }

/* --- PWA: Installationshinweis + Darstellung als installierte App --- */
.sms-install {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1080;
  display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem;
  border-radius: var(--radius-md); border: 1px solid rgba(61, 60, 59, 0.12);
  background: var(--color-surface); box-shadow: var(--shadow-soft); font-size: .85rem;
}
.sms-install-icon { font-size: 1.4rem; color: var(--color-primary-strong); }
.sms-install-text { display: flex; flex-direction: column; line-height: 1.3; }
.sms-install-text span { color: var(--color-muted); }
.sms-install .btn-close { margin-left: auto; }
/* Als installierte App: unten Platz fuer die Home-Leiste, oben fuer die Statusleiste. */
@media (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top); }
  .footer { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  #header { padding-top: env(safe-area-inset-top); height: calc(60px + env(safe-area-inset-top)); }
  .sidebar { top: calc(60px + env(safe-area-inset-top)); }
}

/* Import-Meldungen: umbrechen statt kuerzen, aber die Spalte nicht sprengen. */
.sync-msg { max-width: 34rem; }
.sync-msg div { white-space: normal; word-break: break-word; }

/* --- Raumbelegung --- */
.rm-big { font-size: 1.6rem; font-weight: 700; color: var(--color-secondary); }
.rm-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.rm-chip { display: inline-flex; align-items: baseline; gap: .3rem; padding: .2rem .5rem; border-radius: 999px; font-size: .78rem; }
.rm-chip.free { background: rgba(123, 188, 175, 0.22); color: #0f3b36; }
.rm-chip b { font-weight: 700; }
.rm-table { font-size: .72rem; table-layout: fixed; border-collapse: separate; border-spacing: 2px; width: auto; }
.rm-table th, .rm-table td { padding: .3rem; border: 0; vertical-align: middle; }
/* Die Zeitspalte bleibt stehen, wenn bei 25 Raeumen waagerecht gescrollt wird. */
.rm-th-time {
  width: 66px; white-space: nowrap; font-weight: 600; color: var(--color-muted);
  position: sticky; left: 0; z-index: 2; background: var(--color-card);
}
.rm-th-time .rm-free-count { display: block; font-weight: 400; font-size: .65rem; color: #2f7d6d; }
.rm-th-room { width: 64px; text-align: center; line-height: 1.15; }
.rm-nr { display: block; font-weight: 700; }
.rm-land { display: block; font-weight: 400; font-size: .62rem; color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Frei ist der Normalfall, den man sucht: deutlich gruen. Belegt ist gedaempft. */
.rm-free { background: rgba(123, 188, 175, 0.45); border-radius: 4px; }
.rm-free::after { content: "frei"; display: block; text-align: center; font-size: .6rem; color: #24675a; }
.rm-busy {
  background: rgba(61, 60, 59, 0.07); border-radius: 4px; color: var(--color-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rm-busy a { color: var(--color-muted); text-decoration: none; }
.rm-busy a:hover { color: var(--color-primary-strong); }
.rm-day[hidden] { display: none; }

/* --- Stundenplan-Raster (Alle Kurse), angelehnt an den KMS-Stundenplan --- */
.tt-tabs .nav-link { color: var(--color-muted); font-weight: 600; border: 0; border-bottom: 2px solid transparent; }
.tt-tabs .nav-link.active { color: var(--color-primary-strong); border-bottom-color: var(--color-primary); background: transparent; }
.tt-search { max-width: 260px; }
.tt-day { margin-top: 1.5rem; }
.tt-day-head { text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; font-weight: 700; color: var(--color-text); margin-bottom: .5rem; }
.tt-slot { display: flex; align-items: flex-start; gap: .75rem; padding: .5rem 0; border-top: 1px dashed rgba(61, 60, 59, 0.12); }
.tt-time { flex: 0 0 48px; font-size: .8rem; font-weight: 600; color: var(--color-muted); padding-top: .35rem; }
.tt-cards { display: flex; flex-wrap: wrap; gap: .5rem; }
.tt-card {
  display: flex; flex-direction: column; gap: .2rem; width: 156px; min-height: 76px; padding: .5rem .6rem;
  border-radius: 10px; border: 1px solid rgba(61, 60, 59, 0.12); background: #fffdf8; color: var(--color-text);
  font-size: .78rem; line-height: 1.25; text-decoration: none; transition: box-shadow .15s ease, transform .15s ease;
}
.tt-card:hover { box-shadow: 0 6px 16px rgba(46, 48, 53, 0.12); transform: translateY(-1px); color: var(--color-text); }
.tt-card.own { background: #fdf0c8; border-color: #e5b54a; }
.tt-card.full .tt-occ { color: #b0413e; font-weight: 700; }
.tt-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-letter { display: inline-block; min-width: 1.1rem; padding: 0 .3rem; border-radius: 999px; background: var(--color-secondary); color: #0f3b36; font-size: .68rem; text-align: center; font-weight: 700; }
.tt-meta { color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-foot { display: flex; align-items: center; gap: .45rem; margin-top: auto; color: var(--color-muted); }
.tt-badge { font-size: .65rem; font-weight: 700; padding: 0 .3rem; border-radius: 4px; background: rgba(123, 188, 175, 0.25); color: #0f3b36; }
.tt-zoom { margin-left: auto; color: var(--color-primary-strong); }
.tt-own-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: #fdf0c8; border: 1px solid #e5b54a; vertical-align: middle; }
.tt-card[hidden], .tt-slot[hidden], .tt-day[hidden] { display: none; }
@media (min-width: 1200px) {
  .footer { margin-left: 300px; }
  .toggle-sidebar .footer { margin-left: 0; }
}

/* Verfuegbarkeit: Klick-Raster. Bedeutung steht auch als Text/Symbol in der Zelle, nicht nur als Farbe. */
.av-table th, .av-table td { vertical-align: middle; }
.av-table td { padding: .25rem; min-width: 5.5rem; }
.av-cell {
  display: block; width: 100%; min-height: 2.6rem; border-radius: .5rem; cursor: pointer;
  border: 1px dashed #c8c2b8; background: #fff; color: #8a8378; font-size: .85rem;
  transition: background-color .1s ease;
}
.av-cell:focus-visible { outline: 3px solid #f08a5d; outline-offset: 1px; }
.av-cell.av-::after { content: "–"; }
.av-cell.av-yes::after { content: "verfügbar"; }
.av-cell.av-limited::after { content: "eingeschränkt"; }
.av-cell.av-no::after { content: "nicht verfügbar"; }
.av-cell.av-saving { opacity: .6; }
.av-cell.av-error { outline: 2px solid #b02a37; }
.av-yes { background: #d1e7dd; border: 1px solid #198754; color: #0f5132; }
.av-limited { background: #fff3cd; border: 1px solid #c79100; color: #664d03; }
.av-no { background: #f8d7da; border: 1px solid #b02a37; color: #842029; }
.av-chip {
  display: inline-block; padding: .1rem .55rem; border-radius: .5rem; font-size: .85rem;
  border: 1px dashed #c8c2b8; background: #fff; color: #6c757d;
}
.av-chip.av-yes { background: #d1e7dd; border: 1px solid #198754; color: #0f5132; }
.av-chip.av-limited { background: #fff3cd; border: 1px solid #c79100; color: #664d03; }
.av-chip.av-no { background: #f8d7da; border: 1px solid #b02a37; color: #842029; }
.av-name { display: block; margin: .1rem 0; padding: .05rem .4rem; border-radius: .35rem; font-size: .8rem; }
.av-overview td { min-width: 8rem; vertical-align: top; }
@media (max-width: 767px) {
  .av-table { font-size: .85rem; }
  .av-table th, .av-table td { padding: .2rem .1rem; }
  .av-table td { min-width: 0; width: 17%; }
  .av-cell { font-size: 1.1rem; min-height: 2.4rem; }
  .av-cell.av-yes::after { content: "✓"; }
  .av-cell.av-limited::after { content: "~"; }
  .av-cell.av-no::after { content: "✕"; }
}
