/**
 * Moleskine COD Express Styles - Refined
 */

.moleskine-cod-btn {
    width: 100%;
    margin-top: 10px;
    background-color: #000;
    color: #fff;
    border: 1px solid #000;
    padding: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.moleskine-cod-btn:hover {
    background-color: #333;
    opacity: 0.9;
}

/* Overlay & Modal */
.cod-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999990;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.cod-popup-overlay.active {
    display: flex;
}

.cod-popup-content {
    background: #fff;
    width: 100%;
    max-width: 450px;
    /* Slightly tighter width */
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    font-family: 'Inter', sans-serif;
    /* Try to match common font, or inherit */
}

/* Close Button */
.cod-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.cod-popup-close:hover {
    color: #000;
}

/* Header Summary */
.cod-popup-header-summary {
    margin-bottom: 25px;
}

.cod-summary-preview {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cod-summary-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.cod-summary-text h3 {
    margin: 0 0 5px;
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

/* Badges for Attributes - Clean Layout */
.cod-summary-badges {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-top: 10px;
    padding-top: 5px;
}

/* Attribute Group (Label + Value) */
.cod-attr-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    min-width: 80px;
}

.cod-attr-label {
    font-size: 10px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    line-height: 1;
}

/* Color Swatch Circle */
.cod-color-swatch {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #FF6600;
    box-shadow: none;
    flex-shrink: 0;
}

/* Pill Badge for text options */
.cod-attr-pill {
    display: inline-block;
    padding: 6px 12px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}



/* Form Layout */
.cod-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.cod-col {
    flex: 1;
}

.cod-form-group {
    margin-bottom: 20px;
}

.cod-form-group label,
.cod-col label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    /* Bold headers as requested */
    color: #111;
}

.cod-form-group input,
.cod-col input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    /* Rounded inputs */
    font-size: 14px;
    background: #fcfcfc;
    transition: border-color 0.2s;
    color: #333;
}

.cod-form-group input::placeholder,
.cod-col input::placeholder {
    color: #bbb;
}

.cod-form-group input:focus,
.cod-col input:focus {
    border-color: #000;
    outline: none;
    background: #fff;
}

/* Quantity Selector - Modern Design */
.cod-qty-selector {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 50px !important;
    background: #fafafa !important;
    padding: 4px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.cod-popup-content .cod-qty-selector .cod-qty-btn,
button.cod-qty-btn,
.cod-qty-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    color: #555 !important;
    font-size: 18px !important;
    font-weight: 300 !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

.cod-popup-content .cod-qty-selector .cod-qty-btn:hover,
button.cod-qty-btn:hover,
.cod-qty-btn:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    background-color: rgba(0, 0, 0, 0.08) !important;
    color: #000 !important;
}

.cod-popup-content .cod-qty-selector #cod-qty-input,
#cod-qty-input {
    width: 40px !important;
    height: 32px !important;
    text-align: center !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #111 !important;
    -moz-appearance: textfield;
    appearance: textfield;
    box-shadow: none !important;
}

#cod-qty-input::-webkit-outer-spin-button,
#cod-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}



/* Submit Button */
.cod-popup-content .cod-submit-btn,
.cod-submit-btn {
    background: #111 !important;
    background-color: #111 !important;
    color: #fff !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 16px 20px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    margin-top: 15px !important;
    transition: transform 0.1s, opacity 0.2s !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}


.cod-submit-btn:hover {
    opacity: 0.9;
}

.cod-submit-btn:active {
    transform: scale(0.98);
}

/* Personalization Button */
.cod-personalize-btn {
    display: block !important;
    width: 100% !important;
    background: #fff !important;
    background-color: #fff !important;
    color: #333 !important;
    border: 2px solid #FF6600 !important;
    border-radius: 6px !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    margin-bottom: 10px !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.cod-personalize-btn:hover {
    background: #FFF8F5 !important;
    background-color: #FFF8F5 !important;
    border-color: #E55A00 !important;
}

/* Trust Badges */

.cod-trust-badges {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 13px;
    color: #666;
}

.cod-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s infinite linear;
    margin-left: 10px;
    vertical-align: middle;
}

@media (max-width: 480px) {
    .cod-popup-content {
        padding: 25px 20px;
        width: 95%;
    }

    .cod-row {
        flex-direction: column;
        gap: 0;
    }

    .cod-col {
        margin-bottom: 15px;
    }
}