/* Custom Checkout Widget Styles */

.custom-checkout-widget {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.custom-checkout-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
    box-sizing: border-box;
}

/* Left Column - Form (60%) */
.custom-checkout-form-column {
    flex: 0 0 60%;
    min-width: 300px;
}

.custom-checkout-form {
    width: 100%;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.custom-checkout-title {
    margin: 0 0 20px 0;
    padding: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333333;
}

.custom-checkout-field {
    margin-bottom: 20px;
}

.custom-checkout-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555555;
    font-size: 14px;
}

.custom-checkout-field input,
.custom-checkout-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    background-color: #ffffff;
    color: #333333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    min-height: 44px; /* Same height for all fields */
}

.custom-checkout-field input:focus,
.custom-checkout-field textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.custom-checkout-field textarea {
    resize: vertical;
    min-height: 44px;
}

.custom-checkout-submit-btn {
    width: 100%;
    padding: 14px 20px;
    background-color: #007cba;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
}

.custom-checkout-submit-btn:hover {
    background-color: #005a87;
    transform: translateY(-1px);
}

.custom-checkout-submit-btn:active {
    transform: translateY(0);
}

/* Right Column - Order Summary (40%) */
.custom-checkout-order-summary-column {
    flex: 0 0 40%;
    min-width: 250px;
}

.custom-checkout-order-summary {
    width: 100%;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    height: fit-content;
}

.custom-checkout-order-summary-title {
    margin: 0 0 15px 0;
    padding: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333333;
}

.custom-checkout-order-items {
    margin-bottom: 20px;
}

.custom-checkout-order-item {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.custom-checkout-order-item:last-child {
    border-bottom: none;
}

.custom-checkout-product-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-checkout-product-name {
    font-size: 14px;
    color: #333333;
    flex: 1;
    margin-right: 10px;
}

.custom-checkout-product-price {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    white-space: nowrap;
}

.custom-checkout-order-totals {
    border-top: 1px solid #e0e0e0;
    padding: 15px 0;
}

.custom-checkout-order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.custom-checkout-order-row:last-child {
    margin-bottom: 0;
}

.custom-checkout-label {
    font-size: 14px;
    color: #555555;
}

.custom-checkout-value {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
}

.custom-checkout-total {
    font-size: 16px;
    font-weight: 700;
    color: #333333;
}

.custom-checkout-shipping-section {
    margin: 15px 0;
}

.custom-checkout-shipping-section .custom-checkout-shipping-title {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 10px;
}

.custom-checkout-shipping-options {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.custom-checkout-shipping-option {
    display: flex;
    align-items: center;
    gap: 18px;
}

.custom-checkout-shipping-option input[type="radio"] {
    margin: 0;
    flex-shrink: 0;
}

.custom-checkout-shipping-option label {
    margin: 0;
    font-size: 13px;
    color: #555555;
    cursor: pointer;
    flex: 1;
}

.custom-checkout-payment-methods {
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
}

.custom-checkout-payment-method {
    margin-bottom: 15px;
}

.custom-checkout-payment-method:last-child {
    margin-bottom: 0;
}

.custom-checkout-payment-info h5 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333333;
}

.custom-checkout-payment-info p {
    margin: 0;
    font-size: 13px;
    color: #666666;
    line-height: 1.4;
}

.custom-checkout-submit-section {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    margin-top: 20px;
    text-align: center;
}

.custom-checkout-submit-section .custom-checkout-submit-btn {
    width: 100%;
    padding: 14px 20px;
    background-color: #007cba;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
}

.custom-checkout-submit-section .custom-checkout-submit-btn:hover {
    background-color: #005a87;
    transform: translateY(-1px);
}

.custom-checkout-submit-section .custom-checkout-submit-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-checkout-container {
        flex-direction: column;
        flex-wrap: wrap;
        gap: 15px;
        width: 100%;
    }

    .custom-checkout-form-column,
    .custom-checkout-order-summary-column {
        flex: 0 0 100%;
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }

    .custom-checkout-form,
    .custom-checkout-order-summary {
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .custom-checkout-title {
        font-size: 20px;
    }

    .custom-checkout-order-summary-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .custom-checkout-form,
    .custom-checkout-shipping {
        padding: 12px;
    }

    .custom-checkout-field input,
    .custom-checkout-field textarea {
        padding: 12px;
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 44px; /* Same height for all fields */
    }

    .custom-checkout-submit-btn {
        padding: 12px 16px;
        font-size: 15px;
    }

    .custom-checkout-shipping-option {
        flex-direction: row;
        align-items: flex-start;
        gap: 18px;
    }

    .custom-checkout-shipping-option label {
        flex-direction: column;
		font-size:16px;
        align-items: flex-start;
        gap: 4px;
    }

    .custom-checkout-thank-you {
        padding: 30px 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .thank-you-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .custom-checkout-thank-you h2 {
        font-size: 24px;
    }

    .thank-you-message {
        font-size: 15px;
    }
}

/* Loading and Error States */
.custom-checkout-loading {
    opacity: 0.6;
    pointer-events: none;
}

.custom-checkout-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

.custom-checkout-success {
    color: #28a745;
    font-size: 14px;
    margin-top: 5px;
}

/* Form Validation Styles */
.custom-checkout-field.error input,
.custom-checkout-field.error textarea {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

.custom-checkout-field.error label::after {
    content: " *";
    color: #dc3545;
}

/* Accessibility */
.custom-checkout-field input:focus,
.custom-checkout-field textarea:focus,
.custom-checkout-submit-btn:focus,
.custom-checkout-shipping-option input:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Thank You Page Styles */
.custom-checkout-thank-you {
    text-align: center;
    padding: 40px 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    max-width: 500px;
    margin: 0 auto;
}

.thank-you-icon {
    width: 80px;
    height: 80px;
    background-color: #28a745;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.custom-checkout-thank-you h2 {
    margin: 0 0 15px 0;
    padding: 0;
    font-size: 28px;
    font-weight: 700;
    color: #333333;
}

.order-number {
    font-size: 16px;
    color: #666666;
    margin-bottom: 15px;
}

.thank-you-message {
    font-size: 16px;
    line-height: 1.6;
    color: #555555;
    margin-bottom: 30px;
}

.thank-you-actions {
    margin-top: 20px;
}

.continue-shopping-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007cba;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.2);
}

.continue-shopping-btn:hover {
    background-color: #005a87;
    transform: translateY(-1px);
    color: #ffffff;
    text-decoration: none;
}

.continue-shopping-btn:active {
    transform: translateY(0);
}

/* Hide WooCommerce shipping zone messages */
.custom-checkout-widget .woocommerce-info,
.custom-checkout-widget .woocommerce-message,
.custom-checkout-widget .woocommerce-error {
    display: none !important;
}

/* Hide specific shipping zone message */
.custom-checkout-widget .shipping p,
.custom-checkout-widget .woocommerce-shipping-destination,
.custom-checkout-widget .woocommerce-shipping-methods,
.custom-checkout-widget .woocommerce-shipping-calculator {
    display: none !important;
}

/* Hide "Locations not covered by your other zones" message */
.custom-checkout-widget .woocommerce-shipping-zone-notice,
.custom-checkout-widget .woocommerce-shipping-zone-info {
    display: none !important;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}