/* =========================================================================
   components.css – wiederverwendbare UI-Bausteine:
   Alerts, Adress-Autocomplete, Dialog, Artikel-Liste + Mengen-Stepper.
   ========================================================================= */

/* ---- Buttons: Positions-/Abstands-Varianten -------------------------- */
.topBtn   { margin: 0; }
.botBtn   { margin-top: 1em; }
.backButton { margin-top: 1em; }

/* ---- Alerts (Ersatz für Bootstrap .alert / .alert-danger) ------------ */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-danger {
    color: #b94a48;
    background-color: #f2dede;
    border-color: #eed3d7;
}

/* ---- Datenschutz-Einwilligung (native Checkbox) ----------------------
   Bewusst KEIN .form-control: löst in Chromium beim Fokus einen
   1-Frame-Layout-Kollaps aus (sichtbares Zucken des Labels). */
.consent {
    margin: 1em 0;
}

#policyAgreement {
    width: 25px;
    height: 25px;
    margin: 0 0.4em 0 0;
    vertical-align: text-bottom;
    accent-color: var(--darkBlue);
}

/* "Adresse übernehmen" (Ersatz für Bootstrap .checkbox) */
.checkbox {
    display: block;
    margin: 10px 0;
}

    .checkbox label {
        font-weight: normal;
    }

/* ---- Adress-Autocomplete (Ersatz für Kendo DropDownList) ------------- */
.ac-combo {
    position: relative;
}

.ac-list {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
    max-height: 220px;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid var(--borderColor);
    border-radius: var(--radius);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

    .ac-list li {
        padding: 8px 12px;
        cursor: pointer;
    }

        .ac-list li:hover,
        .ac-list li.ac-active {
            background: #EAF4FF;
        }

.ac-spinner {
    position: absolute;
    right: 12px;
    top: 11px;
    width: 18px;
    height: 18px;
    box-sizing: border-box;
    border: 2px solid var(--borderColor);
    border-top-color: var(--darkBlue);
    border-radius: 50%;
    animation: ac-spin 0.6s linear infinite;
    pointer-events: none;
}

@keyframes ac-spin {
    to { transform: rotate(360deg); }
}

/* Pfeil nach unten: das Feld sieht nach einer Liste aus. Er steht an der Stelle des Ladekreises
   und weicht ihm, solange der Kreis läuft – allein über die Geschwisterregel unten, ohne
   JavaScript. Klicks gehen durch ihn hindurch ins Feld. Fester Abstand nach oben wie beim
   Ladekreis statt 50 %: der Hinweis .ac-error macht die Combo höher, der Pfeil bleibt am Feld. */
.ac-arrow {
    position: absolute;
    right: 16px;
    top: 20px;
    width: 8px;
    height: 8px;
    margin-top: -8px;
    border-right: 2px solid var(--darkBlue);
    border-bottom: 2px solid var(--darkBlue);
    transform: rotate(45deg);
    pointer-events: none;
}

.ac-combo .form-control:disabled ~ .ac-arrow {
    border-color: var(--borderColor);
}

/* Text läuft nicht unter Pfeil oder Ladekreis. */
.ac-combo .form-control {
    padding-right: 40px;
}

/* Hinweis unter dem Feld, wenn eine Anfrage endgültig gescheitert ist (addressAutocomplete.js).
   Bewusst zurückhaltend: Schriftfarbe des Fehlerkastens, ohne Fläche und Rahmen – er gehört zum
   Feld, nicht zur Prüfung beim Absenden. #b94a48 auf Weiß: rund 5:1. */
.ac-error {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.4;
    color: #b94a48;
}

.ac-list[hidden],
.ac-spinner[hidden],
.ac-error[hidden],
.ac-spinner:not([hidden]) + .ac-arrow {
    display: none;
}

/* ---- Dialog (Ersatz für Kendo Dialog, natives <dialog>) -------------- */
.app-dialog {
    width: 320px;
    max-width: 90vw;
    padding: 0;
    border: none;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

    .app-dialog::backdrop {
        background: rgba(0, 0, 0, 0.4);
    }

.app-dialog-title {
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--borderColor);
    font-family: "Myriad Pro Bold", Arial, sans-serif;
    font-size: 16pt;
}

.app-dialog-content {
    padding: 16px;
}

.app-dialog-actions {
    padding: 12px 16px;
    text-align: right;
    border-top: 1px solid var(--borderColor);
}

    /* OK-Button im Dialog: komfortable Größe (Browser-Default ist zu klein). */
    .app-dialog-actions button {
        padding: 8px 28px;
        font-size: 14px;
        min-width: 96px;
    }

/* ---- Artikel-Liste (Altmöbel / Schrott) ------------------------------ */
#bmsBulkyWasteItemsList {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

    #bmsBulkyWasteItemsList li {
        line-height: 48px;
        padding: 0 0.5em;
    }

/* Zeilen-Zebra */
.normal {
    background: var(--white);
}

.grey,
.altGreen {
    background: var(--rowAlt);
}

/* ---- Mengen-Stepper --------------------------------------------------- */
.incrementDecrement {
    width: 10em;
    text-align: right;
    vertical-align: middle;
}

.btn-circle {
    width: 30px;
    height: 30px;
    padding: 0;
    text-align: center;
    font-size: 14px;
    line-height: 30px;
    border-radius: 50%;
}

.left-minus,
.right-plus {
    text-align: center;
}

.minusPlusValue {
    width: 2em;
    text-align: center;
    border: 0;
    margin: 0;
    background: transparent;
    vertical-align: middle;
}

.altGreen .minusPlusValue {
    background: var(--rowAlt);
}

/* Info-Schaltfläche (Bemerkung zum Artikel) */
.remark-btn {
    width: 30px;
    height: 30px;
    margin-right: 0.5em;
    padding: 5px 0 0;
    font-size: 12px;
    line-height: 0.2;
    text-align: center;
    vertical-align: middle;
    border-radius: 15px;
}

.remark-icon {
    width: 20px;
    height: auto;
    margin-top: -5px;
}

/* ---- Wartungsseite (Views/Shared/Maintenance.cshtml) ----------------- */
/* Schlichter, zentrierter Hinweisblock in den Farben des Layouts. Kontrast: Text #333 und
   Überschrift #004F9F auf Weiß liegen beide deutlich über 4.5:1. */
.maintenance {
    max-width: 40em;
    margin: 2.5em auto 0;
    padding: 1.75em 1.5em;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--borderColor);
    border-top: 4px solid var(--darkBlue);
    border-radius: var(--radius);
}

    .maintenance .Heading1 {
        color: var(--darkBlue);
        margin-bottom: 0.6em;
        overflow-wrap: break-word;
    }

    .maintenance p {
        margin: 0.6em 0 0;
        line-height: 1.5;
        font-size: 1.1em;
    }

@media (max-width: 480px) {
    .maintenance {
        margin-top: 1.5em;
        padding: 1.25em 1em;
    }

        .maintenance .Heading1 {
            font-size: 18pt;
        }
}
