/* konsent – Ergänzungen zum carelogic Styleguide.
   Hier steht nur, was der Styleguide nicht mitbringt: die Aufteilung der Detailseite, die
   PDF-Anzeige und ein paar Abstände. Farben, Schrift und Radien kommen aus den Tokens. */

/* ---------- Einzelseiten ---------- */

.kp-panel {
    width: min(100%, 34rem);
}

    .kp-panel form {
        margin: 0;
    }

/* Lange Beschriftungen brechen um, statt aus der Schaltfläche zu laufen. */
.kp-panel .cl-btn.cl-wide {
    height: auto;
    min-height: 44px;
    white-space: normal;
}

.kp-question {
    margin: 1.25rem 0 0.75rem;
    font: 700 16px/1.35 var(--cl-font);
    color: var(--cl-ink);
}

.kp-second {
    margin-top: 0.6rem;
}

.kp-banner {
    margin: 0 0 1rem;
}

.kp-note {
    margin: 0.9rem 0 0;
    font: 400 12.5px/1.5 var(--cl-font);
    color: var(--cl-ink-3);
}

.kp-note + .cl-btn {
    margin-top: 0.9rem;
}

.kp-textarea {
    min-height: 5.5rem;
    resize: vertical;
}

.kp-code {
    font-size: 22px !important;
    letter-spacing: 0.3em;
    font-variant-numeric: tabular-nums;
}

/* Kurzübersicht: Bezeichnung links, Wert rechts */
.kp-facts {
    margin: 1rem 0 0;
    border-top: 1px solid var(--cl-stroke);
}

    .kp-facts > div {
        display: flex;
        gap: 1rem;
        justify-content: space-between;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--cl-stroke);
    }

    .kp-facts dt {
        flex: none;
        color: var(--cl-ink-3);
    }

    .kp-facts dd {
        margin: 0;
        text-align: right;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
    }

.kp-downloads {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    border-top: 1px solid var(--cl-stroke);
}

    .kp-downloads li {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 0.6rem 0;
        border-bottom: 1px solid var(--cl-stroke);
    }

    .kp-downloads span {
        font-size: 12.5px;
        color: var(--cl-ink-3);
    }

/* ---------- Detailseite ---------- */

.kp-single {
    max-width: 36rem;
    margin: 2rem auto;
}

.kp-pad {
    padding-top: 14px;
}

/* Dokument groß links, Angaben rechts */
.kp-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(21rem, 1fr);
    gap: 16px;
    align-items: start;
}

.kp-document {
    min-width: 0;
}

.kp-doctabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

/* PDF.js: Seiten untereinander, auf die Breite eingepasst */
.kp-pdf {
    height: calc(100vh - 13.5rem);
    min-height: 26rem;
    overflow-y: auto;
    padding: 12px;
    background: var(--cl-fill);
    border: 1px solid var(--cl-stroke);
    border-radius: var(--cl-r-card);
}

.kp-pdf-status {
    margin: 0;
    color: var(--cl-ink-3);
}

.kp-pdf-pages canvas {
    display: block;
    width: 100%;
    height: auto;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

    .kp-pdf-pages canvas + canvas {
        margin-top: 12px;
    }

.kp-desc {
    margin: 0 0 0.5rem;
    color: var(--cl-ink-2);
}

.kp-group {
    margin: 0.9rem 0 0.25rem;
    font: 700 11px/1.4 var(--cl-font);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cl-ink-3);
}

.kp-items {
    width: 100%;
    border-collapse: collapse;
}

    .kp-items td {
        padding: 0.4rem 0;
        vertical-align: top;
        border-bottom: 1px solid var(--cl-stroke);
    }

    .kp-items td span {
        display: block;
        font-size: 12.5px;
        color: var(--cl-ink-3);
    }

    .kp-items tfoot td {
        font-weight: 700;
        border-bottom: 0;
    }

.kp-num {
    padding-left: 1rem !important;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Erklärung mit langem Text: Kästchen oben, Text umbrechend */
.kp-check {
    align-items: flex-start;
}

    .kp-check input {
        flex: none;
        margin-top: 2px;
    }

.kp-alt {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.9rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--cl-stroke);
}

@media (max-width: 60rem) {
    .kp-detail {
        grid-template-columns: minmax(0, 1fr);
    }

    .kp-pdf {
        height: 70vh;
        padding: 6px;
    }
}

/* ---------- Blazor ---------- */

#blazor-error-ui {
    display: none;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.6rem 1.25rem;
    background: lightyellow;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
}

    #blazor-error-ui .dismiss {
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
        cursor: pointer;
    }
