/* ==========================================================================
   Building blocks of the mobile kits (B kit: site channel, A kit: employee
   app; both draw them from b-abschnitt.css and b-status.css). The site
   channel's own shell lives in app.css (site-*); what both channels use
   beyond it lives here, so neither copies the other:

   - the status language (StatusDisc, StatusPill, StatusBand): status-*
   - rows in a card (CardRow, .row-card): card-row-*
   - the folding section (SiteSection Collapsible): site-block-summary
   - the sheet from below with a text "Schließen" (BottomSheet CloseAsText)

   Values come from the tokens and from the site channel's status colours
   (--site-*, app.css), which are the kits' b-status.css values.
   ========================================================================== */

/* ---- Status language (b-status.css) -------------------------------------
   The sign carries the meaning, the colour backs it: red and amber are told
   apart under deuteranopia by the sign alone. ✓ ⏱ ✕ – share the site
   channel's colours; ⧗ "eingereicht" is the A kit's own, in the web app's
   info colour. --status-fill is the colour of a band in that tone. */
.status-tone-ok {
    --status-fg: var(--site-ok);
    --status-bg: var(--site-ok-bg);
    --status-fill: var(--success-600);
    --status-sign: var(--site-sign-ok);
}

.status-tone-soon {
    --status-fg: var(--site-soon);
    --status-bg: var(--site-soon-bg);
    --status-fill: var(--site-soon);
    --status-sign: var(--site-sign-soon);
}

.status-tone-bad {
    --status-fg: var(--site-bad);
    --status-bg: var(--site-bad-bg);
    --status-fill: var(--site-bad);
    --status-sign: var(--site-sign-bad);
}

.status-tone-submitted {
    --status-fg: var(--info-text);
    --status-bg: var(--info-100);
    --status-fill: var(--info-text);
    --status-sign: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2h12M6 22h12M7 2c0 5 10 5 10 10S7 17 7 22M17 2c0 5-10 5-10 10s10 5 10 10'/%3E%3C/svg%3E");
}

.status-tone-neutral {
    --status-fg: var(--site-np);
    --status-bg: var(--site-np-bg);
    --status-fill: var(--navy-700);
    --status-sign: var(--site-sign-np);
}

/* The sign, drawn in the current colour - never a character, because a glyph
   looks different on every device. */
.status-glyph {
    -webkit-mask: var(--status-sign) center / contain no-repeat;
    background: currentColor;
    display: inline-block;
    flex: none;
    height: 1.2em;
    mask: var(--status-sign) center / contain no-repeat;
    width: 1.2em;
}

/* The disc at the head of a row (.bs-disc): 34px, the sign on its light ground. */
.status-disc {
    align-items: center;
    background: var(--status-bg);
    border-radius: var(--radius-pill);
    color: var(--status-fg);
    display: flex;
    flex: none;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.status-disc .status-glyph {
    height: 17px;
    width: 17px;
}

/* The state in words with its sign (.bs-pill). */
.status-pill {
    align-items: center;
    background: var(--status-bg);
    border-radius: var(--radius-pill);
    color: var(--status-fg);
    display: inline-flex;
    flex: none;
    font: var(--fw-semibold) 11px/1.3 var(--font-sans);
    gap: 5px;
    padding: 3px 9px 3px 7px;
    white-space: nowrap;
}

/* The answer at the top of a screen (.ap-band): white on the tone's fill. */
.status-band {
    align-items: center;
    background: var(--status-fill);
    border-radius: 16px;
    color: var(--white);
    display: flex;
    gap: var(--space-3);
    margin-bottom: 6px;
    padding: 14px 14px 14px 16px;
    text-decoration: none;
}

a.status-band:hover {
    color: var(--white);
    filter: brightness(1.04);
    text-decoration: none;
}

a.status-band:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

.status-band-sign {
    color: var(--white);
    display: flex;
    flex: none;
}

.status-band-sign .status-glyph {
    height: 24px;
    width: 24px;
}

.status-band-text {
    flex: 1;
    min-width: 0;
}

.status-band-title {
    display: block;
    font: var(--fw-semibold) 17px/1.25 var(--font-sans);
    overflow-wrap: anywhere;
}

.status-band-sub {
    display: block;
    font: var(--fw-regular) 12.5px/1.35 var(--font-sans);
    margin-top: 2px;
    opacity: .94;
    overflow-wrap: anywhere;
}

.status-band > .icon {
    flex: none;
}

/* ---- Rows in a card (.bc-card, .ap-row) ---------------------------------
   The card draws the rule between its rows, whatever element a row is - a
   link, a form whose button is the row, a block with an action under it. */
.row-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-sizing: border-box;
    overflow: hidden;
}

.row-card > * + * {
    border-top: 1px solid var(--border-subtle);
}

.row-card-empty {
    color: var(--text-muted);
    font: var(--fw-regular) 13.5px/1.4 var(--font-sans);
    margin: 0;
    padding: 18px var(--space-4);
    text-align: center;
}

.card-row {
    align-items: center;
    box-sizing: border-box;
    color: inherit;
    display: flex;
    gap: 11px;
    min-height: 44px;
    padding: 12px 12px 12px 13px;
    text-decoration: none;
    width: 100%;
}

a.card-row:hover,
button.card-row:hover {
    background: var(--navy-50);
    color: inherit;
    text-decoration: none;
}

/* Inside the card's rounded edge, which would clip a ring drawn outside. */
a.card-row:focus-visible,
button.card-row:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: -2px;
}

button.card-row {
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.card-row-form {
    margin: 0;
}

.card-row-stacked {
    display: block;
}

.card-row-line {
    align-items: center;
    display: flex;
    gap: 11px;
}

/* What stands under the line starts where the title does (34px disc + 11px gap). */
.card-row-below {
    margin: 10px 0 0 45px;
}

.card-row-main {
    flex: 1;
    min-width: 0;
}

/* A long German type name ("Unbedenklichkeitsbescheinigung") hyphenates in its own language before it breaks. */
.card-row-title {
    color: var(--text-strong);
    display: block;
    font: var(--fw-semibold) 14.5px/1.3 var(--font-sans);
    hyphens: auto;
    overflow-wrap: break-word;
}

.card-row-sub {
    color: var(--text-muted);
    display: block;
    font: var(--fw-regular) 12.5px/1.35 var(--font-sans);
    margin: 2px 0 0;
    overflow-wrap: anywhere;
}

.card-row-chevron {
    color: var(--navy-300);
    display: flex;
    flex: none;
}

.card-row-initials {
    align-items: center;
    background: var(--navy-100);
    border-radius: var(--radius-pill);
    color: var(--navy-700);
    display: flex;
    flex: none;
    font: var(--fw-semibold) 12px var(--font-sans);
    height: 34px;
    justify-content: center;
    width: 34px;
}

/* A small outlined action under a row (.ap-act) - its hit area reaches 44px. */
.card-row-action {
    align-items: center;
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--navy-900);
    display: inline-flex;
    font: var(--fw-semibold) 12.5px/1.2 var(--font-sans);
    gap: 5px;
    padding: 7px 10px;
    position: relative;
    text-decoration: none;
    white-space: nowrap;
}

.card-row-action::after {
    content: "";
    inset: -6px;
    position: absolute;
}

.card-row-action:hover {
    background: var(--navy-50);
    color: var(--navy-900);
    text-decoration: none;
}

/* ---- A section that folds (SiteSection Collapsible, .bc-sh.klapp) --------
   The title is the button, the chevron on the right turns to point right
   while folded. A native details element: no script on the static pages. */
.site-block-summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: var(--space-2);
    list-style: none;
}

.site-block-summary::-webkit-details-marker {
    display: none;
}

.site-block-summary > .site-block-head {
    flex: 1 1 auto;
    min-width: 0;
}

.site-block-summary:hover .site-block-title {
    color: var(--navy-700);
}

.site-block-summary:focus-visible {
    border-radius: var(--radius-sm);
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

.site-block-chevron {
    color: var(--navy-500);
    display: flex;
    flex: none;
    margin-left: 6px;
    transition: transform .15s ease;
}

.site-block-collapsible:not([open]) .site-block-chevron {
    transform: rotate(-90deg);
}

/* ---- The sheet with a text "Schließen" (A kit .bc-textbtn) --------------- */
.site-sheet-close-text {
    align-self: center;
    color: var(--navy-700);
    display: flex;
    font: var(--fw-semibold) 13.5px var(--font-sans);
    justify-content: center;
    min-height: 44px;
    align-items: center;
    padding: 0 var(--space-4);
    text-decoration: none;
}

.site-sheet-close-text:hover {
    color: var(--navy-900);
    text-decoration: underline;
}
