/* COD Popup Styles */
/* Inheriting fonts from the active site theme */

/* Note: We no longer hide the add-to-cart button to maintain Kidz theme compatibility */

/* Popup Logo Styling */
.cod-popup-logo {
    width: 60px !important;
    max-width: 60px !important;
    height: auto !important;
    margin: 0 auto 15px !important;
    display: block !important;
}

/* 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: var(--wp--preset--color--base, #ffffff);
    /* Clean white background for contrast */
    padding: 24px;
    border-radius: 0;
    width: 90%;
    max-width: 380px;
    position: relative;
    font-family: inherit;
    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: var(--wp--preset--color--contrast, #181717);
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 5px;
    text-transform: none;
}

.cod-popup-content p {
    color: #777;
    font-size: 14px;
    margin-bottom: 25px;
}

/* Order Summary */
.cod-summary {
    background: transparent;
    border: 1px solid #d3d3d366;
    padding: 10px;
    border-radius: 0;
    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: 0;
    border: 1px solid #d3d3d366;
}

.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: 5px;
    font-weight: 700;
    color: #222;
    font-size: 13px;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #d3d3d366;
    border-radius: 0;
    background: #fafafa; /* slightly gray to stand out slightly from standard background if transparent */
    font-family: inherit;
    color: inherit;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: #181717;
    background: transparent;
    outline: none;
}

.cod-submit-btn {
    width: 100%;
    background-color: #181717 !important;
    /* Theme dark color */
    color: #fff !important;
    padding: 12px 20px;
    border: 1px solid #181717;
    border-radius: 0;
    font-weight: 400;
    font-size: 14px;
    text-transform: none;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 5px;
}

.cod-submit-btn:hover {
    background-color: #333 !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: #181717;
    flex-shrink: 0;
}

/* ── Shipping Section ── */
.cod-shipping-options {
    margin-bottom: 20px;
}

.cod-shipping-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #d3d3d366;
    margin-bottom: 5px;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    transition: all 0.2s;
    border-radius: 0;
}

.cod-shipping-label:hover {
    background: #fafafa;
}

.cod-shipping-label input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #181717;
}

.shipping-title {
    font-weight: 500;
}

.shipping-cost {
    font-weight: 700;
    margin-left: auto;
    color: #181717;
}

.cod-promo-field {
    margin-bottom: 18px !important;
    background: transparent;
    border: 1px dashed #d3d3d366;
    border-radius: 0;
    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: #181717;
    color: #fff;
    border: 1px solid #181717;
    border-radius: 0;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s;
    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: 15px;
        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: 40px !important;
        margin-bottom: 15px !important;
    }
}