/* COD Popup Styles */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&family=Varela+Round&display=swap');

/* Note: We no longer hide the add-to-cart button to maintain Kidz theme compatibility */

/* Popup Logo Styling */
.cod-popup-logo {
    max-width: 150px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

/* Anti-Bot: Hide Honeypot */
.kiddou-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.cod-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cod-popup-content {
    background: #ffffff;
    /* Clean white background for contrast */
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    position: relative;
    font-family: 'Quicksand', sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.cod-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.cod-close:hover {
    color: #333;
}

.cod-popup-content h3 {
    margin-top: 10px;
    color: #333;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: none;
}

.cod-popup-content p {
    color: #777;
    font-size: 14px;
    margin-bottom: 25px;
}

/* Order Summary */
.cod-summary {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: left;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.summary-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #eee;
}

.summary-details {
    display: flex;
    flex-direction: column;
}

.summary-details strong {
    font-size: 14px;
    color: #333;
    line-height: 1.2;
    margin-bottom: 4px;
}

.summary-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
    line-height: 1.3;
}

.summary-price {
    color: #54585A;
    font-weight: 700;
    font-size: 14px;
}

.summary-qty {
    font-size: 12px;
    color: #999;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #222;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    /* Slightly squarer for modern look */
    background: #fff;
    font-family: inherit;
    color: #333;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: #54585A;
    outline: none;
}

.cod-submit-btn {
    width: 100%;
    background-color: #333 !important;
    /* Dark Grey/Black */
    color: #fff !important;
    padding: 15px;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.cod-submit-btn:hover {
    background-color: #000 !important;
}

.cod-message {
    margin-top: 15px;
    font-weight: 600;
    font-size: 14px;
}

.cod-message.success {
    color: green;
}

.cod-message.error {
    color: red;
}

/* Badges Styles */
.cod-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    /* Space between items */
    margin-top: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-item .icon {
    font-size: 16px;
}

/* Validation Alert */
.kiddou-variation-alert {
    background-color: #FFF3CD;
    /* Soft Yellow */
    color: #54585A;
    /* Theme Anthracite for better integration */
    border: 1px solid #FFEEBA;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 15px;
    display: none;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* ── Promo Code Section ── */

/* Price when coupon applied */
.cod-price-original {
    text-decoration: line-through;
    color: #aaa;
    font-size: 13px;
    margin-right: 4px;
}

.cod-price-discounted {
    color: #2a7a2a;
    font-weight: 700;
    font-size: 16px;
}

.cod-promo-toggle-group {
    margin-bottom: 10px !important;
}

.cod-promo-toggle-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600 !important;
    color: #54585A !important;
    font-size: 14px;
    margin-bottom: 0 !important;
}

.cod-promo-toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #54585A;
    flex-shrink: 0;
}

.cod-promo-field {
    margin-bottom: 18px !important;
    background: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 6px;
    padding: 14px !important;
}

.cod-promo-input-wrap {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.cod-promo-input-wrap .form-control {
    flex: 1;
    margin-bottom: 0;
}

.cod-apply-coupon-btn {
    background: #54585A;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.cod-apply-coupon-btn:hover {
    background: #333;
}

.cod-apply-coupon-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cod-coupon-message {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    min-height: 18px;
}

.cod-coupon-message.success {
    color: #2a7a2a;
}

.cod-coupon-message.error {
    color: #c0392b;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .cod-popup-content {
        padding: 20px;
        width: 92%;
        margin-top: 10px;
        margin-bottom: 10px;
        max-height: 90vh;
        /* Prevent overflow on small screens */
        overflow-y: auto;
        /* Allow scrolling inside popup */
    }

    .cod-popup-content h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .cod-summary {
        padding: 10px;
        margin-bottom: 15px;
    }

    .summary-img {
        width: 50px;
        height: 50px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .cod-submit-btn {
        padding: 12px;
        font-size: 13px;
    }

    .cod-badges {
        gap: 10px;
        font-size: 11px;
        flex-direction: row;
        /* Keep in row but smaller */
        flex-wrap: wrap;
    }

    .cod-close {
        top: 10px;
        right: 10px;
        font-size: 24px;
    }

    /* Adjust logo size */
    .cod-popup-logo {
        max-width: 120px !important;
        margin-bottom: 15px !important;
    }
}