/*
 * Anwalt-Lotse Bootstrap theme (PDF color mapping).
 * Loaded after Bootstrap on the main site only (_base.html).
 */
:root,
[data-bs-theme="light"] {
    /* Core palette */
    --bs-primary: #003158;
    --bs-primary-rgb: 0, 49, 88;
    --bs-secondary: #6f6f6e;
    --bs-secondary-rgb: 111, 111, 110;
    --bs-success: #2a722b;
    --bs-success-rgb: 42, 114, 43;
    --bs-danger: #c41314;
    --bs-danger-rgb: 196, 19, 20;
    --bs-warning: #de7e00;
    --bs-warning-rgb: 222, 126, 0;
    --bs-info: #87ceeb;
    --bs-info-rgb: 135, 206, 235;
    --bs-light: #fde4d4;
    --bs-light-rgb: 253, 228, 212;
    --bs-dark: #003158;
    --bs-dark-rgb: 0, 49, 88;

    /* Emphasis / subtle variants */
    --bs-primary-text-emphasis: #002846;
    --bs-primary-bg-subtle: #6a85a6;
    --bs-primary-border-subtle: #4a6380;
    --bs-secondary-text-emphasis: #4a4a49;
    --bs-secondary-bg-subtle: #b2b2b1;
    --bs-secondary-border-subtle: #969695;
    --bs-success-text-emphasis: #1a4a1b;
    --bs-success-bg-subtle: #9bb389;
    --bs-success-border-subtle: #6f8f5f;
    --bs-danger-text-emphasis: #8a0e0f;
    --bs-danger-bg-subtle: #e29176;
    --bs-danger-border-subtle: #c96f52;
    --bs-warning-text-emphasis: #553600;
    --bs-warning-bg-subtle: #f1bf87;
    --bs-warning-border-subtle: #d9a05a;
    --bs-info-text-emphasis: #003158;
    --bs-info-bg-subtle: #c9e7f2;
    --bs-info-border-subtle: #9fd4e8;
    --bs-light-text-emphasis: #003158;
    --bs-light-bg-subtle: #fac9a9;
    --bs-light-border-subtle: #f5b080;

    /* Body */
    --bs-body-color: #003158;
    --bs-body-color-rgb: 0, 49, 88;
    --bs-body-bg: #ffffff;
    --bs-body-bg-rgb: 255, 255, 255;

    /* Links */
    --bs-link-color: #003158;
    --bs-link-color-rgb: 0, 49, 88;
    --bs-link-hover-color: #124571;
    --bs-link-hover-color-rgb: 18, 69, 113;

    /* Search-page button states (custom components) */
    --al-primary-hover: #124571;
    --al-primary-active: #002846;
    --al-warning-hover: #c57000;
    --al-warning-active: #b36600;
}

/* Solid buttons */
.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--al-primary-hover);
    --bs-btn-hover-border-color: var(--al-primary-hover);
    --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--al-primary-active);
    --bs-btn-active-border-color: var(--al-primary-active);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--bs-primary);
    --bs-btn-disabled-border-color: var(--bs-primary);
}

.btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-secondary);
    --bs-btn-border-color: var(--bs-secondary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #5a5a59;
    --bs-btn-hover-border-color: #545453;
    --bs-btn-focus-shadow-rgb: var(--bs-secondary-rgb);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #484847;
    --bs-btn-active-border-color: #424241;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--bs-secondary);
    --bs-btn-disabled-border-color: var(--bs-secondary);
}

.btn-success {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-success);
    --bs-btn-border-color: var(--bs-success);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #225a23;
    --bs-btn-hover-border-color: #205421;
    --bs-btn-focus-shadow-rgb: var(--bs-success-rgb);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #1b481c;
    --bs-btn-active-border-color: #19431a;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--bs-success);
    --bs-btn-disabled-border-color: var(--bs-success);
}

.btn-danger {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-danger);
    --bs-btn-border-color: var(--bs-danger);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #a01011;
    --bs-btn-hover-border-color: #960f10;
    --bs-btn-focus-shadow-rgb: var(--bs-danger-rgb);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #850d0e;
    --bs-btn-active-border-color: #7d0c0d;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--bs-danger);
    --bs-btn-disabled-border-color: var(--bs-danger);
}

.btn-warning {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-warning);
    --bs-btn-border-color: var(--bs-warning);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--al-warning-hover);
    --bs-btn-hover-border-color: var(--al-warning-hover);
    --bs-btn-focus-shadow-rgb: var(--bs-warning-rgb);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--al-warning-active);
    --bs-btn-active-border-color: var(--al-warning-active);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--bs-warning);
    --bs-btn-disabled-border-color: var(--bs-warning);
}

.btn-info {
    --bs-btn-color: var(--bs-body-color);
    --bs-btn-bg: var(--bs-info);
    --bs-btn-border-color: var(--bs-info);
    --bs-btn-hover-color: var(--bs-body-color);
    --bs-btn-hover-bg: #6bb8d6;
    --bs-btn-hover-border-color: #62b0cf;
    --bs-btn-focus-shadow-rgb: var(--bs-info-rgb);
    --bs-btn-active-color: var(--bs-body-color);
    --bs-btn-active-bg: #52a8cc;
    --bs-btn-active-border-color: #4da0c4;
    --bs-btn-disabled-color: var(--bs-body-color);
    --bs-btn-disabled-bg: var(--bs-info);
    --bs-btn-disabled-border-color: var(--bs-info);
}

/* Outline buttons */
.btn-outline-primary {
    --bs-btn-color: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--bs-primary);
    --bs-btn-hover-border-color: var(--bs-primary);
    --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--al-primary-active);
    --bs-btn-active-border-color: var(--al-primary-active);
}

.btn-outline-secondary {
    --bs-btn-color: var(--bs-secondary);
    --bs-btn-border-color: var(--bs-secondary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--bs-secondary);
    --bs-btn-hover-border-color: var(--bs-secondary);
    --bs-btn-focus-shadow-rgb: var(--bs-secondary-rgb);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #484847;
    --bs-btn-active-border-color: #484847;
}

.btn-outline-success {
    --bs-btn-color: var(--bs-success);
    --bs-btn-border-color: var(--bs-success);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--bs-success);
    --bs-btn-hover-border-color: var(--bs-success);
    --bs-btn-focus-shadow-rgb: var(--bs-success-rgb);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #1b481c;
    --bs-btn-active-border-color: #1b481c;
}

.btn-outline-danger {
    --bs-btn-color: var(--bs-danger);
    --bs-btn-border-color: var(--bs-danger);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--bs-danger);
    --bs-btn-hover-border-color: var(--bs-danger);
    --bs-btn-focus-shadow-rgb: var(--bs-danger-rgb);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #850d0e;
    --bs-btn-active-border-color: #850d0e;
}

.btn-outline-warning {
    --bs-btn-color: var(--bs-warning);
    --bs-btn-border-color: var(--bs-warning);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--bs-warning);
    --bs-btn-hover-border-color: var(--bs-warning);
    --bs-btn-focus-shadow-rgb: var(--bs-warning-rgb);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--al-warning-active);
    --bs-btn-active-border-color: var(--al-warning-active);
}

.btn-outline-info {
    --bs-btn-color: var(--bs-info-text-emphasis);
    --bs-btn-border-color: var(--bs-info);
    --bs-btn-hover-color: var(--bs-body-color);
    --bs-btn-hover-bg: var(--bs-info);
    --bs-btn-hover-border-color: var(--bs-info);
    --bs-btn-focus-shadow-rgb: var(--bs-info-rgb);
    --bs-btn-active-color: var(--bs-body-color);
    --bs-btn-active-bg: #52a8cc;
    --bs-btn-active-border-color: #52a8cc;
}

/* Contrast-safe text on colored badges */
.text-bg-warning {
    color: #fff !important;
}

.text-bg-info,
.text-bg-light {
    color: var(--bs-body-color) !important;
}

/* BRAK Zweigstelle: one icon column, chevron shows it expands */
details[data-brak-branch] > summary {
    list-style: none;
    cursor: pointer;
}

details[data-brak-branch] > summary::-webkit-details-marker {
    display: none;
}

details[data-brak-branch] > summary .brak-branch-chevron {
    transition: transform 0.15s ease;
}

details[data-brak-branch][open] > summary .brak-branch-chevron {
    transform: rotate(180deg);
}

details[data-brak-branch] .brak-branch-body {
    /* Match summary geo icon (1em) + Bootstrap me-2 */
    padding-left: calc(1em + 0.5rem);
}

/* Profile actions next to the freshness badge („Bearbeiten“, „Profil beanspruchen“):
   one row from 576px up, full-width buttons stacked below the badge on phones. */
@media (max-width: 575.98px) {
    .profile-actions,
    .profile-actions .btn:not(.btn-link) {
        width: 100%;
    }
}

/* BRAK freshness: green when <24h, browner as the check ages. */
.brak-freshness-badge {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.brak-freshness-badge .brak-freshness-full {
    display: none;
}
.brak-freshness-badge:hover .brak-freshness-compact,
.brak-freshness-badge:focus-visible .brak-freshness-compact {
    display: none;
}
.brak-freshness-badge:hover .brak-freshness-full,
.brak-freshness-badge:focus-visible .brak-freshness-full {
    display: inline;
}
.brak-freshness-badge .brak-freshness-elapsed {
    display: none;
}
.brak-freshness-refreshing {
    animation: brak-freshness-pulse 2s ease-in-out infinite;
}
.brak-freshness-refreshing:hover,
.brak-freshness-refreshing:focus-visible {
    animation: none;
}
.brak-freshness-refreshing:hover .brak-freshness-elapsed,
.brak-freshness-refreshing:focus-visible .brak-freshness-elapsed {
    display: inline;
}
/* A stale stamp a visitor can refresh: the reload sign turns once on load,
   so the eye finds it; no endless motion (the pulse means "refreshing"). */
.brak-freshness-cue {
    display: inline-block;
    animation: brak-freshness-cue-turn 0.6s ease-in-out 0.8s 1;
}
.badge.brak-freshness-actionable:hover,
.badge.brak-freshness-actionable:focus-visible {
    filter: brightness(1.12);
}
/* „Daten neu abrufen“ with the stamp inside: full width on phones, like the
   profile actions next to it. */
@media (max-width: 575.98px) {
    .profile-freshness,
    .profile-refresh-button {
        width: 100%;
    }
}
@keyframes brak-freshness-cue-turn {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .brak-freshness-cue {
        animation: none;
    }
}
@keyframes brak-freshness-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}
@media (prefers-reduced-motion: reduce) {
    .brak-freshness-refreshing {
        animation: none;
    }
}
.brak-freshness-0 {
    background: #2a722b;
    color: #fff;
}
.brak-freshness-1 {
    background: #5c7a2e;
    color: #fff;
}
.brak-freshness-2 {
    background: #8a6a24;
    color: #fff;
}
.brak-freshness-3 {
    background: #8b5a2b;
    color: #fff;
}
.brak-freshness-4 {
    background: #6e3f22;
    color: #fff;
}
.brak-freshness-5 {
    background: #4a2c14;
    color: #fff;
}
.brak-freshness-none {
    background: #c41314;
    color: #fff;
}

/* Verification-age table: bar length is the count (share of the
   largest row). ``display: block`` would make fit-content = 100% of
   the cell, so the bar is inline-block inside a full-width track. */
.verification-age-track {
    display: block;
    width: 100%;
}
.verification-age-bar {
    display: inline-block;
    box-sizing: border-box;
    min-width: fit-content;
    max-width: 100%;
    padding: 0.35em 0.75em;
    border-radius: var(--bs-border-radius-pill);
    color: #fff;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    text-align: left;
    overflow: visible;
    vertical-align: middle;
}
/* Phones: a row name such as „1 Woche bis 1 Monat“ wraps instead of pushing
   „Anteil“ out of the table. */
@media (max-width: 575.98px) {
    .verification-age-bar {
        white-space: normal;
        border-radius: 1rem;
    }
}

/* Bootstrap Icons shift glyphs 0.125em below the baseline to center them
   on body text. In headings the glyph bottom should sit on the text
   baseline instead (the icon font's glyph box already ends there). */
.bi-on-baseline::before {
    vertical-align: baseline;
}

/* „Statistiken | Rankings“ tabs above every page under „Zahlen“: muted
   tabs, the active one in the brand colour, its underline on the bar's
   bottom border. */
.zahlen-tabs .nav-underline {
    --bs-nav-link-color: var(--bs-secondary-color);
    --bs-nav-link-hover-color: var(--bs-primary);
    --bs-nav-underline-link-active-color: var(--bs-primary);
    margin-bottom: -1px;
}

/* Grouped overview of „Statistiken“: a small card (the whole card is the
   link) shows that it is one on hover and keyboard focus. */
.catalog-card {
    transition: border-color 0.15s ease-in-out;
}

.catalog-card:hover,
.catalog-card:focus-within {
    border-color: var(--bs-primary) !important;
}

/* Kuselit publication rows on the profile and its publications page: the
   whole row opens „Zuordnung“ (the journal icon is a stretched link), and
   shows that on hover. Vote buttons, the full-text link and the lawyer's
   „Link zum Volltext“ sit above the stretched link. */
.publication-entry {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--bs-border-radius);
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.publication-entry:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.07);
}

.publication-entry .publication-entry-actions,
.publication-entry .publication-link-action {
    cursor: auto;
}

.publication-entry:hover .publication-entry-title {
    text-decoration: underline;
}

.publication-entry .publication-entry-actions,
.publication-entry .publication-link-action,
.publication-entry .publication-fulltext {
    position: relative;
    z-index: 2;
}

/* Dashboard tiles „Werkzeuge für Ihre Kanzlei“ (lawyer/_dashboard_home.html):
   the open tile is filled, so its hint takes the button's text colour. */
.dashboard-tool.active .text-muted {
    color: inherit !important;
    opacity: 0.85;
}

/* External link marker for links inside text that is edited on production
   (feature descriptions): add class="link-external" to the <a>. */
a.link-external::after {
    content: "\f1c5"; /* bi-box-arrow-up-right */
    font-family: bootstrap-icons;
    font-size: 0.75em;
    margin-left: 0.25em;
    vertical-align: baseline;
    text-decoration: none;
    display: inline-block;
}

/* Fake-Kanzlei-Check and „Warnungen und Berichte“: the homepage search below a
   name (fake/_verify_search_panel.html). One frame, a little wider than the
   rows, so it reads as that name's details and not as more rows. */
.fake-verify-panel {
    position: relative;
    margin: -.25rem 0 .75rem;
    padding: 2.25rem 1rem .5rem;
    border: 2px solid var(--bs-emphasis-color);
    border-radius: var(--bs-border-radius-lg);
    background: var(--bs-body-bg);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}
@media (min-width: 576px) {
    .fake-verify-panel { margin-inline: -.75rem; }
}
.fake-verify-panel-close {
    position: absolute;
    top: .6rem;
    right: .6rem;
}
/* Below an entry the panel opens under a line of small text: normal size. */
.fake-report-comparison .fake-verify-panel {
    font-size: 1rem;
    margin: .5rem 0 .75rem;
}
/* A sentence among the result lines („… so nicht im amtlichen Verzeichnis;
   wir finden …“) stands at the intro's level; the lawyers stay indented. */
.fake-report-comparison .fake-report-sentence {
    margin-left: -1rem;
}

/* An address that opens a menu of map services (lawyer/includes/_map_links.html,
   fake/_verify_site_data.html): plain text until hovered or focused. */
.profile-map-toggle:hover,
.profile-map-toggle:focus-visible {
    text-decoration: underline dotted !important;
    text-underline-offset: 3px;
}

/* „Adresse kopieren“ in that menu (lawyer/includes/_map_menu.html): the
   confirmation replaces the label for two seconds. Both labels share one grid
   cell and only their visibility changes, so the menu keeps the width of the
   longer one (Ralf, 2026-11-19: it shrank while „Adresse kopiert“ showed). */
.map-copy-address {
    display: grid;
}
.map-copy-address > span {
    grid-area: 1 / 1;
}
.map-copy-address .map-copy-ok,
.map-copy-address.map-copy-done .map-copy-idle {
    visibility: hidden;
}
.map-copy-address.map-copy-done .map-copy-ok {
    visibility: visible;
}
/* Green by its own rule, not `text-success`: the Fake-Kanzlei-Check keeps
   green away from addresses on a known fake site. */
.map-copy-address .map-copy-ok {
    color: var(--bs-success);
}

/* Login form (templates/_login_form.html): a bracket on the left joins
   „Mit Passkey einloggen“, the password login and „Eingeloggt bleiben“, so
   the box reads as one for both ways (Ralf, 2026-11-20). It shows only once
   static/js/passkeys.js has shown the passkey parts; without browser support
   the form stays a plain password form. Top: the passkey button's middle;
   bottom: the box's line. */
.login-ways-bracket:has([data-passkey-only]:not(.d-none)) {
    position: relative;
    padding-left: 1.5rem;
}
.login-ways-bracket:has([data-passkey-only]:not(.d-none))::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.2rem;
    bottom: 0.75rem;
    width: 0.75rem;
    border: 2px solid var(--bs-primary);
    border-right: 0;
    border-radius: 0.5rem 0 0 0.5rem;
}
.login-ways-hint {
    padding-left: 1.5em;
}
form:has(.login-ways-bracket [data-passkey-only]:not(.d-none)) .login-ways-hint {
    padding-left: calc(1.5rem + 1.5em);
}
/* The ⓘ after „Eingeloggt bleiben“ folds the hint open, filled while open,
   as the ⓘ on /features/ (feature/benefits.html). */
.login-remember-info {
    vertical-align: baseline;
}
.login-remember-info .login-remember-info-expanded,
.login-remember-info[aria-expanded="true"] .login-remember-info-collapsed {
    display: none;
}
.login-remember-info[aria-expanded="true"] .login-remember-info-expanded {
    display: inline-block;
}
