/* DocID-Prüfung: Aufbau wie die Formulare der LÄKH (weißer Kopf, Karten auf hellem Grund),
   Farben aus dem Logo der BÄK (images/logo-baek.svg, #004A99). Ohne Bootstrap. */

:root {
    --baek-blue:   #004A99;
    --baek-blue-d: #003A78;
    --page-bg:     #eef2f7;   /* BÄK-Blau, stark aufgehellt */
    --card-border: #e2e8f0;
    --hairline:    #edf0f3;
    --text:        #1f2a37;
    --muted:       #6c757d;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font: 1rem/1.5 var(--font);
}

a { color: var(--baek-blue); }
a:hover { color: var(--baek-blue-d); }

.page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Kopf: weißer Banner über die volle Breite */
.banner {
    background: #fff;
    border-bottom: 1px solid var(--card-border);
    box-shadow: 0 1px 3px rgba(16, 40, 74, .06);
    padding: 1rem 0 1.25rem;
}
.banner .page {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
}
.banner .kicker {
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
    color: var(--baek-blue);
}
.banner h1 {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    margin: .3rem 0 0;
}
.banner img {
    display: block;
    height: 80px;
    width: auto;
}
@media (max-width: 575.98px) {
    .banner img { height: 46px; }
}

main.page { padding-top: 1.5rem; }

/* Karten */
.box {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: .75rem;
    box-shadow: 0 1px 3px rgba(16, 40, 74, .06), 0 1px 2px rgba(16, 40, 74, .04);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 575.98px) {
    .box { padding: 1.25rem 1rem; }
}
.box-title {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--baek-blue);
    margin: 0 0 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--hairline);
}
.box-title .ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: .55rem;
    background: #e6eef8;
}
.box-title .ico svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.box p:last-child { margin-bottom: 0; }

/* Schritte, untereinander */
.steps {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
    display: grid;
    gap: .85rem;
}
.steps li { display: flex; gap: .75rem; align-items: flex-start; }
.steps .num {
    flex: 0 0 auto;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    background: var(--baek-blue);
    color: #fff;
    font-weight: 600;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Aufklappbare Karten: Titel klappt auf, Pfeil rechts */
.fold > summary { list-style: none; cursor: pointer; user-select: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold:not([open]) > summary { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.fold .chevron { margin-left: auto; width: 1rem; height: 1rem; fill: currentColor; transition: transform .15s; }
.fold[open] .chevron { transform: rotate(180deg); }
.fold > summary:focus-visible { outline: 2px solid var(--baek-blue); outline-offset: 4px; border-radius: .25rem; }

/* Erklärung "So funktioniert der Dienst" */
.explain h3 { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 .5rem; }
.explain .key {
    background: #eaf1f8;
    border-left: 3px solid var(--baek-blue);
    border-radius: .375rem;
    padding: .8rem 1rem;
}

/* Prüfung: Feld hervorgehoben, Schrift in Standardgröße */
label { display: block; font-weight: 600; margin-bottom: .5rem; }
.check-row { display: flex; gap: .5rem; }
@media (max-width: 767.98px) {
    .check-row { flex-direction: column; }
}
.docid-field {
    flex: 1 1 auto;
    min-width: 0;
    font: inherit;
    color: inherit;
    background: #f7f9fc;
    border: 2px solid #c9d6e6;
    border-radius: .375rem;
    padding: .7rem .9rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.docid-field:focus {
    background: #fff;
    border-color: var(--baek-blue);
    box-shadow: 0 0 0 .2rem rgba(0, 74, 153, .15);
}
.btn {
    font: inherit;
    font-weight: 500;
    color: #fff;
    background: var(--baek-blue);
    border: 1px solid var(--baek-blue);
    border-radius: .375rem;
    padding: .7rem 1.4rem;
    cursor: pointer;
    white-space: nowrap;
}
.btn:hover, .btn:focus-visible { background: var(--baek-blue-d); border-color: var(--baek-blue-d); }
.btn:disabled { opacity: .65; cursor: default; }
.form-text { color: var(--muted); font-size: .875rem; margin-top: .4rem; }

/* Ergebnis: HTML der Kammer, nur Grundformatierung */
.result-raw { overflow-wrap: anywhere; }
.result-raw img { max-width: 100%; height: auto; }
.result-raw table { width: 100%; border-collapse: collapse; margin: .75rem 0; }
.result-raw td, .result-raw th {
    text-align: left;
    vertical-align: top;
    padding: .5rem .5rem .5rem 0;
    border-bottom: 1px solid var(--hairline);
}
.result-raw tr:last-child td, .result-raw tr:last-child th { border-bottom: 0; }
.result-raw td:first-child { width: 40%; color: #4b5563; }
.result-raw ul { padding-left: 1.25rem; }
.notice {
    border-left: 3px solid var(--muted);
    background: #f5f6f8;
    border-radius: .375rem;
    padding: .8rem 1rem;
}
.notice.warn { border-color: #c27c0e; background: #fdf6e7; }
.muted { color: var(--muted); }

footer {
    text-align: center;
    font-size: .875rem;
    padding: .5rem 0 2rem;
}
footer a { color: var(--muted); text-decoration: none; margin: 0 .75rem; }
footer a:hover { color: var(--baek-blue); text-decoration: underline; }

/* Konfigurationsseite (/config/) */
.config-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0 .75rem; }
.config-table th, .config-table td {
    text-align: left;
    vertical-align: top;
    padding: .85rem 1.25rem .85rem 0;
    border-bottom: 1px solid var(--hairline);
}
.config-table th { color: var(--muted); font-weight: 600; font-size: .875rem; padding-top: 0; }
.config-table td.prefix { white-space: nowrap; width: 6.5rem; font-weight: 600; }
.config-table .kammer { font-weight: 600; }
.config-table .url { color: #4b5563; white-space: nowrap; }
.config-table tr:last-child td { border-bottom: 0; }
@media (max-width: 767.98px) {
    .config-table thead { display: none; }
    .config-table tr { display: block; padding: .75rem 0; border-bottom: 1px solid var(--hairline); }
    .config-table td { display: block; border: 0; padding: .1rem 0; width: auto !important; }
    .config-table .url { white-space: normal; overflow-wrap: anywhere; }
}
