/* =========================================================================
   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;
}

/* ---- Native Checkboxen (Datenschutz + Express) -----------------------
   Bewusst KEIN .form-control: löst in Chromium beim Fokus einen
   1-Frame-Layout-Kollaps aus (sichtbares Zucken des Labels). */
#policyAgreement, #expressDates {
    width: 25px;
    height: 25px;
    margin: 0 0.4em 0 0;
    vertical-align: text-bottom;
    accent-color: var(--ofColor);
}

.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: #FBEAE3;
        }

.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(--ofColor);
    border-radius: 50%;
    animation: ac-spin 0.6s linear infinite;
    pointer-events: none;
}

@keyframes ac-spin {
    to { transform: rotate(360deg); }
}

.ac-list[hidden],
.ac-spinner[hidden] {
    display: none;
}

/* Termin-Dropdowns (Assignment): Spinner wie bei der Straßenauswahl, aber
   links vom nativen Select-Pfeil platziert, damit er ihn nicht überdeckt. */
.date-combo { display: block; }
.date-combo .ac-spinner { right: 34px; }

/* ---- 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-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 ---------------------------------------------------- */
#bmsBulkyWasteItemsList {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

    #bmsBulkyWasteItemsList li {
        line-height: 48px;
        padding: 0 0.5em;
    }

.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;
}
