/* =========================================================
   Willii Checkout — Toggle UI (Abholung / Lieferung)
   ========================================================= */

.willii-fulfillment-toggle {
    display: flex;
    gap: 0.75rem;
    margin: 0 0 1.25rem;
}

.willii-toggle-btn {
    flex: 1;
    padding: 0.85rem 1rem;
    border: 2px solid #dcdcde;
    border-radius: 6px;
    background: #ffffff;
    color: #1d2327;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    line-height: 1.3;
}

.willii-toggle-btn:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.willii-toggle-btn.willii-toggle-active,
.willii-toggle-btn[aria-pressed="true"] {
    border-color: #2271b1;
    background: #2271b1;
    color: #ffffff;
}

.willii-section {
    margin-bottom: 0.25rem;
}

/* =========================================================
   Willii Checkout — Haupt-Container
   ========================================================= */

#willii-checkout-state {
    margin: 0 0 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid #dcdcde;
    background: #f6f7f7;
    border-radius: 4px;
}

#willii-checkout-state h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

#willii-checkout-state small {
    display: block;
    line-height: 1.5;
}

#willii-checkout-state .form-row {
    margin-bottom: 0.75rem;
}

#willii-checkout-state input[readonly] {
    background: #f0f0f1;
}

#willii-checkout-state .willii-datepicker-input {
    cursor: pointer;
}

/* Inline datepicker container */
.willii-datepicker-inline {
    display: inline-block;
    width: 100%;
    max-width: 22rem;
    margin: 0.5rem 0 1rem;
}

.willii-datepicker-inline .ui-datepicker {
    position: static !important;
    display: block !important;
    width: 100%;
    box-shadow: none;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

.ui-datepicker {
    width: 19rem;
    padding: 0.6rem;
    border: 1px solid #dcdcde;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    z-index: 99999 !important;
}

.ui-datepicker .ui-datepicker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.ui-datepicker .ui-datepicker-title {
    font-weight: 600;
}

.ui-datepicker table {
    width: 100%;
    border-collapse: collapse;
}

.ui-datepicker th,
.ui-datepicker td {
    padding: 0.15rem;
    text-align: center;
}

.ui-datepicker td a,
.ui-datepicker td span {
    display: block;
    padding: 0.35rem 0;
    border-radius: 4px;
    text-decoration: none;
}

.ui-datepicker td a {
    color: #1d2327;
}

.ui-datepicker td a.ui-state-active,
.ui-datepicker td a:hover {
    background: #2271b1;
    color: #fff;
}

.ui-datepicker td.ui-state-disabled span {
    color: #8c8f94;
    opacity: 0.45;
}

.willii-theme-shop-light .ui-datepicker {
    border-color: #dcdcde;
    background: #ffffff;
    color: #1d2327;
}

.willii-theme-shop-light .ui-datepicker-header {
    color: #1d2327;
}

.willii-theme-shop-light td a.ui-state-active,
.willii-theme-shop-light td a:hover {
    background: #2271b1;
    color: #fff;
}

.willii-theme-shop-warm .ui-datepicker {
    border-color: #d7c7b5;
    background: #fffaf3;
    color: #4a3426;
}

.willii-theme-shop-warm .ui-datepicker-header {
    color: #6b4b33;
}

.willii-theme-shop-warm td a {
    color: #5b4333;
}

.willii-theme-shop-warm td a.ui-state-active,
.willii-theme-shop-warm td a:hover {
    background: #b56a3b;
    color: #fffaf3;
}

.willii-theme-shop-sage .ui-datepicker {
    border-color: #bfd0c2;
    background: #f4f8f2;
    color: #243529;
}

.willii-theme-shop-sage .ui-datepicker-header {
    color: #2b4934;
}

.willii-theme-shop-sage td a {
    color: #27412f;
}

.willii-theme-shop-sage td a.ui-state-active,
.willii-theme-shop-sage td a:hover {
    background: #557a5f;
    color: #f4f8f2;
}

.willii-theme-shop-dark .ui-datepicker {
    border-color: #39414a;
    background: #20262d;
    color: #eef2f5;
}

.willii-theme-shop-dark .ui-datepicker-header {
    color: #eef2f5;
}

.willii-theme-shop-dark td a {
    color: #eef2f5;
}

.willii-theme-shop-dark td a.ui-state-active,
.willii-theme-shop-dark td a:hover {
    background: #4f8cc9;
    color: #ffffff;
}

.willii-theme-shop-dark td.ui-state-disabled span {
    color: #9aa6b2;
}

.willii-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.willii-checkout-notice {
    display: block;
    margin: 0.35rem 0 0;
    padding: 0.4rem 0.6rem;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 4px;
    color: #991b1b;
    font-size: 0.875em;
    line-height: 1.4;
}

.willii-next-dates {
    margin: 0.35rem 0 0;
}

.willii-next-dates-title {
    margin: 0;
    color: #50575e;
}

.willii-disabled-reason {
    display: block;
    margin-top: 0.25rem;
    color: #8a2424;
}

/* =========================================================
   Willii Checkout — Versandauswahl (Radio-Liste im WC-Feld)
   ========================================================= */

.willii-method-group-heading {
    margin: 1rem 0 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #50575e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.willii-method-group-heading:first-child {
    margin-top: 0;
}

.willii-shipping-list {
    margin: 0 0 0.5rem;
    padding: 0;
    list-style: none;
}

.willii-shipping-list li {
    margin: 0 0 0.4rem;
    padding: 0;
}

.willii-shipping-list label {
    cursor: pointer;
    line-height: 1.4;
}

.willii-shipping-tax-info,
.willii-shipping-free-hint {
    display: block;
    margin-left: 1.5rem;
    color: #50575e;
    font-size: 0.85em;
    line-height: 1.35;
}

/* =========================================================
   Willii Checkout — Datumsanzeige (nach Auswahl)
   ========================================================= */

.willii-date-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.25rem 0 0.75rem;
    font-weight: 500;
}

.willii-date-display-text {
    cursor: pointer;
    text-decoration: underline;
    color: #2271b1;
}

.willii-date-display-text:hover {
    color: #135e96;
}

.willii-date-change-btn {
    background-color: #2271b1 !important;
    border: 1px solid #2271b1 !important;
    border-radius: 3px;
    color: #fff !important;
    cursor: pointer;
    font-size: 0.8em;
    line-height: 1;
    padding: 0.2em 0.55em;
}

.willii-date-change-btn:hover {
    background-color: #2271b1 !important;
    color: #fff !important;
}

/* Feiertage im Kalender rot markieren */
.ui-datepicker td.willii-calendar-holiday span {
    background: #fef2f2;
    color: #dc2626;
    border-radius: 4px;
    font-weight: 600;
}


/* "(optional)"-Hinweis am Zeitfenster-Feld ausblenden */
#_willii_delivery_slot_field .optional {
    display: none;
}
