/**
 * 123-Verleih Anfrage Plugin v2.0 - Checkout Styles
 * Rendert den kompletten Checkout eigenständig
 * Branding: Dunkelviolett (#1a0a2e) + Gold (#c8a96e)
 */

/* ============================================================
 * GRUNDLAYOUT
 * ============================================================ */

.woocommerce-checkout {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.vla-checkout-header {
    margin-bottom: 30px;
}

.vla-checkout-subtitle {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-left: 4px solid #c8a96e;
    border-radius: 0 8px 8px 0;
}

/* ============================================================
 * SEKTIONEN
 * ============================================================ */

.vla-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.vla-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a0a2e;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #c8a96e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vla-icon {
    font-size: 1.4rem;
}

/* ============================================================
 * LIEFERUNG / ABHOLUNG
 * ============================================================ */

.vla-delivery-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.vla-delivery-option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #fafafa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.vla-delivery-option:hover {
    border-color: #c8a96e;
    background: #fffbf0;
}

.vla-delivery-option-active,
.vla-delivery-option:has(input:checked) {
    border-color: #c8a96e;
    background: #fffbf0;
    box-shadow: 0 0 0 1px #c8a96e;
}

.vla-delivery-option input[type="radio"] {
    margin-right: 12px;
    accent-color: #c8a96e;
    width: 18px;
    height: 18px;
}

.vla-option-text {
    font-size: 15px;
    color: #333;
}

/* ============================================================
 * INFO-BOXEN
 * ============================================================ */

.vla-info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 10px;
    margin: 16px 0;
    animation: vla-fadeIn 0.3s ease;
}

.vla-info-pickup {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.vla-info-delivery {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
}

.vla-info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.vla-info-content {
    font-size: 0.95rem;
    line-height: 1.5;
}

.vla-info-content strong {
    color: #1a0a2e;
}

.vla-info-detail {
    color: #666;
    font-size: 13px;
}

/* Abholstation Links */
.vla-pickup-links {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.vla-pickup-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #a5d6a7;
    border-radius: 6px;
    color: #2e7d32;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.vla-pickup-link:hover {
    background: #2e7d32;
    color: #fff;
    border-color: #2e7d32;
}

/* ============================================================
 * GEODATEN (Kein Straßenname)
 * ============================================================ */

.vla-no-address-toggle {
    margin: 16px 0;
    padding: 12px 16px;
    background: #fff3e0;
    border: 1px solid #ffcc80;
    border-radius: 8px;
}

.vla-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.vla-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #c8a96e;
}

.vla-geo-hint {
    padding: 12px 16px;
    background: #e8eaf6;
    border: 1px solid #9fa8da;
    border-radius: 8px;
    margin-bottom: 16px;
}

.vla-geo-hint p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

/* ============================================================
 * MIETZEITRAUM
 * ============================================================ */

.vla-date-row {
    display: flex;
    gap: 16px;
}

.vla-date-row .form-row-first,
.vla-date-row .form-row-last {
    flex: 1;
}

.vla-datepicker {
    cursor: pointer !important;
    background: #fff url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>') no-repeat right 12px center !important;
    padding-right: 40px !important;
}

.vla-duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #1a0a2e, #2d1b4e);
    color: #c8a96e;
    border-radius: 20px;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.vla-duration-icon {
    font-size: 16px;
}

/* ============================================================
 * ZAHLUNGSART-PRÄFERENZ
 * ============================================================ */

.vla-payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.vla-payment-option {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: #fafafa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vla-payment-option:hover {
    border-color: #c8a96e;
    background: #fffbf0;
}

.vla-payment-option:has(input:checked) {
    border-color: #c8a96e;
    background: #fffbf0;
    box-shadow: 0 0 0 1px #c8a96e;
}

.vla-payment-option input[type="radio"] {
    margin-right: 12px;
    accent-color: #c8a96e;
    width: 18px;
    height: 18px;
}

.vla-payment-note {
    font-size: 13px;
    color: #888;
    margin: 0;
}

/* ============================================================
 * KONTAKTDATEN
 * ============================================================ */

.vla-section-contact .woocommerce-billing-fields__field-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.vla-section-contact .form-row-wide {
    grid-column: 1 / -1;
}

.vla-section-contact .form-row-first {
    grid-column: 1;
}

.vla-section-contact .form-row-last {
    grid-column: 2;
}

/* ============================================================
 * FORMULAR-ELEMENTE
 * ============================================================ */

.vla-section input[type="text"],
.vla-section input[type="email"],
.vla-section input[type="tel"],
.vla-section select,
.vla-section textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
}

.vla-section input:focus,
.vla-section select:focus,
.vla-section textarea:focus {
    border-color: #c8a96e;
    box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.15);
    outline: none;
    background: #fff;
}

.vla-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.vla-section label .optional {
    font-weight: 400;
    color: #999;
    font-size: 13px;
}

/* ============================================================
 * BESTELLÜBERSICHT (rechte Seite)
 * ============================================================ */

.woocommerce-checkout #order_review_heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a0a2e;
    padding-bottom: 12px;
    border-bottom: 2px solid #c8a96e;
}

/* Anfrage-Button */
.woocommerce #place_order,
.woocommerce-page #place_order {
    background: linear-gradient(135deg, #c8a96e, #b8963d) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 16px 32px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    text-transform: none !important;
}

.woocommerce #place_order:hover,
.woocommerce-page #place_order:hover {
    background: linear-gradient(135deg, #b8963d, #a8862d) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(200, 169, 110, 0.4) !important;
}

/* AGB Checkbox */
.woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 16px;
}

/* ============================================================
 * WooCommerce STANDARD-ELEMENTE AUSBLENDEN
 * ============================================================ */

/* Zahlungsart komplett weg */
#payment,
.woocommerce-checkout-payment,
.wc_payment_methods,
.payment_methods,
div.payment_box,
.wc_payment_method,
[id*="payment_method"],
.woocommerce-checkout h3#payment_heading {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Versand ausblenden */
.woocommerce-shipping-fields,
.shipping_address,
#ship-to-different-address {
    display: none !important;
}

/* Coupon ausblenden */
.woocommerce-form-coupon-toggle,
.checkout_coupon {
    display: none !important;
}

/* Billing-Überschrift ausblenden (wir haben unsere eigene) */
.woocommerce-billing-fields > h3 {
    display: none !important;
}

/* ============================================================
 * DANKE-SEITE
 * ============================================================ */

.vla-thankyou {
    max-width: 700px;
    margin: 0 auto;
}

.vla-thankyou-header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #1a0a2e, #2d1b4e);
    border-radius: 12px;
    margin-bottom: 24px;
    color: white;
}

.vla-thankyou-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.vla-thankyou-title {
    color: #c8a96e !important;
    font-size: 1.6rem;
    margin: 0 0 8px;
}

.vla-thankyou-message {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.6;
}

.vla-thankyou-steps {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.vla-thankyou-steps h3 {
    color: #1a0a2e;
    margin: 0 0 20px;
    font-size: 1.15rem;
}

.vla-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vla-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px;
    border-radius: 8px;
    background: #f8f8f8;
}

.vla-step-active {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.vla-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.vla-step-active .vla-step-number {
    background: #4caf50;
    color: white;
}

.vla-step-content strong {
    display: block;
    color: #1a0a2e;
    font-size: 0.95rem;
}

.vla-step-content span {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

.vla-thankyou-summary {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.vla-thankyou-summary h3 {
    color: #1a0a2e;
    margin: 0 0 16px;
}

.vla-summary-table {
    width: 100%;
    border-collapse: collapse;
}

.vla-summary-table td {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.vla-summary-table .vla-label {
    font-weight: 600;
    color: #1a0a2e;
    width: 40%;
}

.vla-badge {
    display: inline-block;
    background: #c8a96e;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 8px;
}

.vla-thankyou-contact {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.vla-thankyou-contact h3 {
    color: #1a0a2e;
    margin: 0 0 16px;
}

.vla-contact-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.vla-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.vla-contact-phone {
    background: #1a0a2e;
    color: white !important;
}

.vla-contact-phone:hover {
    background: #2d1b4e;
}

.vla-contact-email {
    background: #c8a96e;
    color: white !important;
}

.vla-contact-email:hover {
    background: #b8963d;
}

.vla-contact-whatsapp {
    background: #25d366;
    color: white !important;
}

.vla-contact-whatsapp:hover {
    background: #1da851;
}

/* ============================================================
 * JQUERY UI DATEPICKER
 * ============================================================ */

.ui-datepicker {
    font-family: inherit !important;
    border-radius: 12px !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    padding: 8px !important;
    z-index: 9999 !important;
}

.ui-datepicker-header {
    background: #1a0a2e !important;
    color: white !important;
    border: none !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 10px !important;
}

.ui-datepicker-title {
    color: white !important;
    font-weight: 600 !important;
}

.ui-datepicker-prev,
.ui-datepicker-next {
    cursor: pointer !important;
}

.ui-datepicker-prev span,
.ui-datepicker-next span {
    background-image: none !important;
}

.ui-datepicker-prev:after {
    content: '\25C0';
    color: #c8a96e;
    font-size: 0.9rem;
}

.ui-datepicker-next:after {
    content: '\25B6';
    color: #c8a96e;
    font-size: 0.9rem;
}

.ui-datepicker td a {
    text-align: center !important;
    border-radius: 6px !important;
    padding: 6px !important;
}

.ui-datepicker td a:hover {
    background: #fffbf0 !important;
    border-color: #c8a96e !important;
}

.ui-datepicker td a.ui-state-active {
    background: #c8a96e !important;
    color: white !important;
    border-color: #c8a96e !important;
}

.ui-datepicker td a.ui-state-highlight {
    background: #f0e6d0 !important;
    border-color: #c8a96e !important;
}

/* ============================================================
 * WARENKORB-SEITE
 * ============================================================ */

.woocommerce-cart .coupon,
.woocommerce-cart .cart-collaterals .cross-sells {
    display: none !important;
}

.woocommerce-cart .wc-proceed-to-checkout a {
    background: linear-gradient(135deg, #c8a96e, #b8963d) !important;
    color: #fff !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    padding: 14px 28px !important;
}

.woocommerce-cart .wc-proceed-to-checkout a:hover {
    background: linear-gradient(135deg, #b8963d, #a8862d) !important;
}

/* ============================================================
 * WOOCOMMERCE NOTICES
 * ============================================================ */

.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    border-radius: 8px !important;
}

.woocommerce-error {
    border-left-color: #e53935 !important;
}

.woocommerce-message {
    border-left-color: #43a047 !important;
}

.woocommerce-info {
    border-left-color: #c8a96e !important;
}

/* ============================================================
 * ANIMATIONEN
 * ============================================================ */

@keyframes vla-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes vla-slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
 * RESPONSIVE
 * ============================================================ */

@media (max-width: 768px) {
    .vla-section {
        padding: 16px;
        margin-bottom: 16px;
    }

    .vla-section-title {
        font-size: 1.1rem;
    }

    .vla-date-row {
        flex-direction: column;
        gap: 0;
    }

    .vla-date-row .form-row-first,
    .vla-date-row .form-row-last {
        width: 100%;
    }

    /* Kontaktdaten Grid auf 1 Spalte */
    .vla-section-contact .woocommerce-billing-fields__field-wrapper {
        display: block !important;
        grid-template-columns: 1fr !important;
    }

    /* ALLE form-row Varianten auf volle Breite */
    .vla-section-contact .form-row-first,
    .vla-section-contact .form-row-last,
    .vla-section-contact .form-row-wide,
    .vla-section-contact .form-row,
    body.woocommerce-checkout .vla-section .form-row,
    body.woocommerce-checkout .vla-section .form-row-first,
    body.woocommerce-checkout .vla-section .form-row-last {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
        padding-right: 0 !important;
        margin-bottom: 12px !important;
        box-sizing: border-box !important;
    }

    /* ALLE Input-Felder auf volle Breite */
    .vla-section input[type="text"],
    .vla-section input[type="email"],
    .vla-section input[type="tel"],
    .vla-section input[type="date"],
    .vla-section select,
    .vla-section textarea,
    body.woocommerce-checkout .form-row input,
    body.woocommerce-checkout .form-row input.input-text,
    body.woocommerce-checkout .form-row select,
    body.woocommerce-checkout .form-row textarea,
    body.woocommerce-checkout input[type="text"],
    body.woocommerce-checkout input[type="email"],
    body.woocommerce-checkout input[type="tel"] {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
    }

    /* WooCommerce form-row Override fuer Mobile - body-Level */
    body.woocommerce-checkout .woocommerce form .form-row-first,
    body.woocommerce-checkout .woocommerce form .form-row-last,
    body.woocommerce-checkout .woocommerce-page form .form-row-first,
    body.woocommerce-checkout .woocommerce-page form .form-row-last,
    body .woocommerce form .form-row-first,
    body .woocommerce form .form-row-last {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }

    /* Checkout Container auch volle Breite */
    body.woocommerce-checkout .site-content,
    body.woocommerce-checkout .content-area,
    body.woocommerce-checkout .site-main,
    body.woocommerce-checkout .entry-content,
    body.woocommerce-checkout .elementor-widget-container,
    body.woocommerce-checkout .e-con,
    body.woocommerce-checkout .e-con-inner,
    body.woocommerce-checkout .woocommerce,
    body.woocommerce-checkout article {
        padding-left: 10px !important;
        padding-right: 10px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .vla-pickup-links {
        flex-direction: column;
    }

    .vla-delivery-option {
        padding: 14px 16px;
    }

    .vla-payment-option {
        padding: 12px 14px;
    }

    .vla-info-box {
        flex-direction: column;
        gap: 8px;
    }

    .vla-contact-options {
        flex-direction: column;
    }

    .vla-contact-btn {
        justify-content: center;
    }

    /* Checkout Gesamtbereich: letter-spacing fix */
    .woocommerce-checkout * {
        letter-spacing: 0 !important;
        word-spacing: 0 !important;
    }
}
