/* --- Moderne Checkout Styling - Conversiegericht --- */

/* --- ALGEMENE LAYOUT & TYPOGRAFIE --- */
.modern-checkout-form {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a1a;
}

.modern-checkout-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    padding: 24px 0;
}

/* --- LINKER KOLOM: KLANTGEGEVENS --- */
.checkout-details-column h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 32px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
}

.checkout-section {
    margin-bottom: 32px;
    padding: 24px;
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.checkout-section:last-of-type {
    margin-bottom: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #1a1a1a;
}

.section-title svg {
    color: #007bff;
}

/* --- FORMULIER VELDEN --- */
.woocommerce form .form-row {
    margin-bottom: 16px;
}

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

.woocommerce form .form-row input,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #ffffff;
}

.woocommerce form .form-row input:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.woocommerce form .form-row input.error,
.woocommerce form .form-row textarea.error,
.woocommerce form .form-row select.error {
    border-color: #dc3545;
}

/* --- CHECKBOX & RADIO STYLING --- */
.woocommerce form .form-row input[type="checkbox"],
.woocommerce form .form-row input[type="radio"] {
    width: auto;
    margin-right: 8px;
}

.woocommerce form .form-row .woocommerce-terms-and-conditions {
    margin-top: 16px;
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

/* --- RECHTER KOLOM: BESTELLING OVERZICHT --- */
.checkout-summary-column .order-summary {
    position: sticky;
    top: 24px;
    background-color: #f9f9f9;
    padding: 24px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
}

.summary-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: #1a1a1a;
}

.summary-title svg {
    color: #007bff;
}

/* --- BESTELLING OVERZICHT TABEL --- */
.woocommerce-checkout-review-order-table {
    width: 100%;
    border: none;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 12px 0;
    border-top: 1px solid #e5e5e5;
    text-align: left;
    font-size: 14px;
}

.woocommerce-checkout-review-order-table tr:first-child th,
.woocommerce-checkout-review-order-table tr:first-child td {
    border-top: none;
}

.woocommerce-checkout-review-order-table td {
    text-align: right;
    font-weight: 600;
}

.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    border-top: 2px solid #e5e5e5;
}

/* --- BETALINGSMETHODEN --- */
.wc_payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wc_payment_methods li {
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background-color: #ffffff;
    transition: border-color 0.2s ease;
}

.wc_payment_methods li:hover {
    border-color: #007bff;
}

.wc_payment_methods li input[type="radio"] {
    margin-right: 12px;
}

.wc_payment_methods li label {
    font-weight: 600;
    cursor: pointer;
}

/* --- PLACE ORDER KNOP --- */
#place_order {
    background-color: #007bff !important;
    color: white !important;
    width: 100%;
    padding: 18px !important;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    display: block;
    text-transform: none;
    margin-top: 16px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
    cursor: pointer;
}

#place_order:hover {
    background-color: #0056b3 !important;
    transform: translateY(-2px);
}

#place_order:disabled {
    background-color: #6c757d !important;
    cursor: not-allowed;
    transform: none;
}

/* --- TRUST SIGNALS --- */
.trust-signals {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e5e5;
}

.trust-signals .payment-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    filter: grayscale(1);
    opacity: 0.7;
}

.trust-signals .payment-icons img {
    height: 24px;
    width: auto;
}

.trust-signals .secure-checkout-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    margin-top: 16px;
    text-align: center;
}

.trust-signals .secure-checkout-text svg {
    color: #28a745;
}

/* --- SHIPPING METHODS --- */
.woocommerce-shipping-methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-shipping-methods li {
    margin-bottom: 8px;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background-color: #ffffff;
}

.woocommerce-shipping-methods li input[type="radio"] {
    margin-right: 12px;
}

/* --- ERROR & SUCCESS MESSAGES --- */
.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 600;
}

.woocommerce-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.woocommerce-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.woocommerce-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .modern-checkout-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .checkout-summary-column .order-summary {
        position: static;
    }
}

@media (max-width: 576px) {
    .checkout-details-column h1 {
        font-size: 24px;
    }
    
    .checkout-section {
        padding: 16px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .summary-title {
        font-size: 18px;
    }
    
    .woocommerce form .form-row input,
    .woocommerce form .form-row textarea,
    .woocommerce form .form-row select {
        font-size: 16px; /* Voorkomt zoom op iOS */
    }
}

/* --- WOOCOMMERCE SPECIFIEKE OVERRIDES --- */
.woocommerce-checkout .woocommerce-billing-fields,
.woocommerce-checkout .woocommerce-shipping-fields {
    margin-bottom: 0;
}

.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3 {
    display: none; /* We gebruiken onze eigen section titles */
}

.woocommerce-checkout .woocommerce-additional-fields {
    margin-top: 0;
}

.woocommerce-checkout .woocommerce-additional-fields h3 {
    display: none;
}

/* --- LOADING STATES --- */
.woocommerce-checkout.processing #place_order {
    opacity: 0.7;
    cursor: not-allowed;
}

/* --- ACCESSIBILITY --- */
.woocommerce form .form-row input:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* --- JAVASCRIPT ENHANCEMENTS --- */
.checkout-section {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.form-row.focused {
    transform: translateY(-2px);
}

.form-row.has-error input,
.form-row.has-error textarea,
.form-row.has-error select {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.wc_payment_methods li.selected {
    border-color: #007bff;
    background-color: #f8f9ff;
}

#place_order.processing {
    opacity: 0.7;
    cursor: not-allowed;
}

/* --- PRINT STYLES --- */
@media print {
    .modern-checkout-layout {
        grid-template-columns: 1fr;
    }
    
    .checkout-summary-column .order-summary {
        position: static;
    }
} 

/* --- Modern WooCommerce Section Cards --- */
.woocommerce-billing-fields,
.woocommerce-shipping-fields,
.woocommerce-checkout-payment {
    margin-bottom: 32px;
    padding: 24px;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.woocommerce-billing-fields:last-child,
.woocommerce-shipping-fields:last-child,
.woocommerce-checkout-payment:last-child {
    margin-bottom: 0;
}

.woocommerce-billing-fields > h3,
.woocommerce-shipping-fields > h3,
.woocommerce-checkout-payment > h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #1a1a1a;
}
.woocommerce-billing-fields > h3:before {
    content: "\f007";
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #007bff;
    font-size: 18px;
}
.woocommerce-shipping-fields > h3:before {
    content: "\f0d1";
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #007bff;
    font-size: 18px;
}
.woocommerce-checkout-payment > h3:before {
    content: "\f09d";
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #007bff;
    font-size: 18px;
}

/* Remove duplicate default Woo titles */
.woocommerce-billing-fields > h3,
.woocommerce-shipping-fields > h3,
.woocommerce-additional-fields > h3 {
    /* Already styled above, so no extra margin */
    margin-top: 0;
}

/* Spacing for order notes */
.woocommerce-additional-fields {
    margin-top: 16px;
} 

/* --- Card styling for additional fields (order notes) --- */
.woocommerce-additional-fields {
    margin-bottom: 32px;
    padding: 24px;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* --- Reduce padding for payment method card and payment method items --- */
.woocommerce-checkout-payment {
    padding: 16px 16px 0 16px;
}
.woocommerce-checkout-payment > h3 {
    margin-bottom: 16px;
    margin-top: 0;
    padding-bottom: 8px;
}
.wc_payment_methods {
    margin-bottom: 0;
}
.wc_payment_methods li {
    margin-bottom: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    transition: border-color 0.2s;
}
.wc_payment_methods li:last-child {
    margin-bottom: 0;
}

/* --- Hide empty shipping fields card --- */
.woocommerce-shipping-fields {
    display: none !important;
} 

.woocommerce-additional-fields{
    margin-top: 10px!important;
}
