/* Additions of the web app on top of the design stylesheets (cocci.css, taken from Entwurf/vorschau). */

/* Start / loading: logo on the page colour */
.start { height: 100%; display: flex; align-items: center; justify-content: center; background: var(--seite); }
.start img { width: 240px; max-width: 70vw; height: auto; }

/* Unexpected error bar of Blazor */
#blazor-error-ui { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000; padding: 12px 16px; background: var(--elfenbein); border-top: 1px solid var(--brand); font-size: 14px; }
#blazor-error-ui .reload { margin-left: 8px; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }

/* Hidden inputs (date picker, file picker) */
.versteckt { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }

/* Notice bars */
.meldung .meldung-text { flex-grow: 1; min-width: 0; }
.meldung .meldung-aktion { flex-shrink: 0; display: flex; }
.meldung.banner { border-left: 0; border-right: 0; border-top: 0; flex-shrink: 0; }
.meldung.tag-hinweis { margin-top: 12px; }
.meldung.schwebend { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 900; box-shadow: var(--schatten-klein); max-width: 720px; margin: 0 auto; }
@media (max-width: 700px) { .meldung.schwebend { bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom)); } }
.abstand-unten { margin-bottom: 12px; }
a.btn { text-decoration: none; }

/* Split buttons and absent button when the row may not be changed (not today, outside the window) */
.split.aus { background: var(--linie); color: var(--text); border-color: var(--linie); box-shadow: none; }
.split button:disabled, .abwesend-btn:disabled { cursor: default; }
.abwesend-btn:disabled { opacity: .55; }
.split-in { box-shadow: 0 2px 4px rgba(0, 0, 0, .18); }
.split-in.aus { box-shadow: none; }

/* Under the name: "Noch nicht übertragen" / "Check-In 07:42 durch …" (phone card too) */
.kind-karte .zeile1 .wer { display: block; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zeiten-handy .kopfzeile .meldung.tag-hinweis { margin-top: 0; }
.kind-karte .grund-fehlt { flex-grow: 1; }

/* Minute marker between the 5-minute buttons of the clock face */
.ziffernblatt .punkt-min { position: absolute; width: 14px; height: 14px; border-radius: 7px; background: var(--brand); }

/* Day field: the date in the middle is a button that opens the browser's calendar */
.tagwahl { position: relative; }
.tagwahl .datum-knopf { flex-grow: 1; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 500; font-size: 14px; color: var(--text); width: auto; }
.tagwahl button:disabled { color: var(--linie); }

/* Certificate viewer */
.attest-dialog { width: min(900px, 96vw); height: min(90vh, 1000px); display: flex; flex-direction: column; overflow: hidden; }
.attest-dialog .kopf-a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--linie-2); }
.attest-dialog .kopf-a .titel-md { font-size: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attest-dialog .inhalt-a { flex-grow: 1; min-height: 0; background: var(--weiss); display: flex; align-items: center; justify-content: center; overflow: auto; }
.attest-dialog .inhalt-a iframe { width: 100%; height: 100%; border: 0; }
.attest-dialog .inhalt-a img { max-width: 100%; max-height: 100%; object-fit: contain; }
.attest-dialog .dialog-fuss .links { display: inline-flex; align-items: center; color: var(--brand); }
.abw-tabelle .ansehen { color: var(--brand); text-align: left; font-size: 15px; }

/* PIN link without connection */
.pin-link.aus { opacity: .5; pointer-events: none; }

/* Settings: refused changes */
.fehl-zeile { padding: 8px 0; border-top: 1px solid var(--flaeche); }

/* Contracts one under the other */
.vertrag-block + .vertrag-block { margin-top: 16px; }

/* Phone header: Kita and person under each other, sync dot with pending count */
.kopf-handy .standort .wer-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.kopf-handy .standort .wer-text .name, .kopf-handy .standort .wer-text .person { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kopf-handy .standort .wer-text .person { font-size: 13px; font-weight: 400; color: var(--text-2); }
/* Several Kitas on one account ("Kita A - Kita B"): the names may wrap to two lines, the header grows to fit. */
.kopf-handy.mehrere { height: auto; min-height: 56px; padding-top: 6px; padding-bottom: 6px; }
.kopf-handy.mehrere .standort { height: auto; }
.kopf-handy .standort .wer-text .name.mehrere { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 14px; line-height: 1.25; }
.kopf-handy .standort { text-decoration: none; color: var(--text); }
.sync-punkt { display: none; }
a.sync-pille { text-decoration: none; }
@media (max-width: 700px) {
  .sync-punkt { position: relative; display: flex; align-items: center; height: 44px; padding: 0 4px 0 6px; flex-shrink: 0; }
  .sync-punkt .zahl { position: absolute; top: 4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: var(--weiss); font-size: 12px; font-weight: 700; line-height: 18px; text-align: center; }
  .kopf-handy { padding-top: env(safe-area-inset-top); height: calc(56px + env(safe-area-inset-top)); }
  /* Absences table on the phone: keep "Ändern" (the design hid that column), hide the certificate column instead */
  .abw-tabelle .kopf-t, .abw-tabelle .zeile-t { grid-template-columns: 1fr 1.7fr .5fr auto; }
  .abw-tabelle .kopf-t span:nth-child(4), .abw-tabelle .zeile-t > :nth-child(4) { display: none; }
  .abw-tabelle .kopf-t span:last-child, .abw-tabelle .zeile-t .rechts { display: flex; }
  .einstellungen dl { grid-template-columns: 110px minmax(0, 1fr); }
}

/* Lock screen and sign-in on small phones: scroll instead of cutting off */
@media (max-height: 760px), (max-width: 700px) {
  .auth { justify-content: flex-start; overflow-y: auto; padding-top: 56px; padding-bottom: 96px; }
  .auth .auth-uhr .zeit { font-size: 48px; line-height: 52px; }
}
@media (max-width: 700px) {
  .version-info { right: 12px; bottom: 12px; font-size: 13px; }
  .abmelden-unten { left: 4px; bottom: 4px; }
}

/* Phone: the list is its own page, no child is "selected" there; back link without underline */
@media (max-width: 700px) {
  .kinder:not(.detail-offen) .kind-eintrag .initialen-kachel.weiss { background: var(--elfenbein); }
}
.kind-detail > header .zurueck { text-decoration: none; }
