/*
 * Easy COD Checkout - Mobile-First Optimized CSS 
 * Optimized for performance, touch interactions, and small screens 
 */ 

/* ======== CSS RESET & BASE MOBILE STYLES ======== */ 
.easy-cod-popup-overlay *, 
.easy-cod-popup-overlay *::before, 
.easy-cod-popup-overlay *::after { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
} 

/* ======== POPUP OVERLAY - MOBILE FIRST ======== */ 
.easy-cod-popup-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background-color: rgba(0, 0, 0, 0.5); 
    display: none; 
    z-index: 9999; 
    overflow-y: auto; 
    align-items: flex-start; 
    justify-content: center; 
    -webkit-overflow-scrolling: touch; 
    padding-top: 20px;
} 

/* ======== POPUP CONTAINER - MOBILE FIRST ======== */ 
.easy-cod-popup-container { 
    background-color: #fff; 
    width: 100%;
    max-width: 500px; /* Reduced from 600px */
    max-height: 85vh; /* Reduced from 90vh */
    position: relative; 
    margin: 20px auto; /* Added margin for better spacing */
    border-radius: 12px; /* Slightly smaller radius */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); /* Softer shadow */
    padding: 12px 14px; /* Reduced padding */
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; 
    animation: slideDownMobile 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    transform-origin: top; 
    will-change: transform;
    box-sizing: border-box;
} 

/* ======== ANIMATIONS ======== */ 
@keyframes slideDownMobile { 
    from { 
        transform: translateY(-20px); 
        opacity: 0; 
    } 
    to { 
        transform: translateY(0); 
        opacity: 1; 
    } 
}

@keyframes slideUpMobile { 
    from { 
        transform: translateY(0); 
        opacity: 1; 
    } 
    to { 
        transform: translateY(-20px); 
        opacity: 0; 
    } 
}

.easy-cod-popup-overlay.closing .easy-cod-popup-container { 
    animation: slideUpMobile 0.2s ease-in-out forwards; 
} 

/* ======== CLOSE BUTTON - MOBILE OPTIMIZED ======== */ 
.easy-cod-popup-close { 
    position: absolute !important; 
    top: 12px !important; 
    right: 12px !important; 
    width: 32px !important; 
    height: 32px !important; 
    font-size: 18px !important; 
    font-weight: 400 !important; 
    color: #ffffff !important; 
    background: #000000 !important; 
    border: 2px solid #000000 !important; 
    border-radius: 50% !important; 
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    cursor: pointer !important; 
    z-index: 10 !important; 
    box-shadow: 0 2px 6px rgb(0, 0, 0) !important; 
    transition: all 0.2s ease !important; 
    -webkit-tap-highlight-color: transparent !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
} 

.easy-cod-popup-close:hover,
.easy-cod-popup-close:active { 
    transform: scale(0.95) !important; 
    background: #000000 !important;
    border-color: #000000 !important;
    color: #ffffff !important;
} 

/* ======== TYPOGRAPHY - MOBILE OPTIMIZED ======== */ 
.easy-cod-popup-container h2 { 
    margin: 0 0 16px 0; /* Reduced from 20px */
    font-size: 18px; /* Reduced from 20px */
    font-weight: 600; 
    color: #1a1a1a; 
    padding-right: 40px; /* Reduced from 50px */
    line-height: 1.3; 
} 

/* ======== PRODUCT IMAGE - MOBILE OPTIMIZED ======== */ 
.easy-cod-product-image-container { 
    text-align: center; 
    margin-bottom: 16px; /* Reduced from 20px */
    position: relative; 
} 

.easy-cod-product-image-container img { 
    max-width: 100%; 
    height: auto; 
    max-height: 140px; /* Reduced from 160px */
    border-radius: 8px; /* Reduced from 12px */
    border: 1px solid #f0f0f0; 
    padding: 6px; /* Reduced from 8px */
    background: #fff; 
    object-fit: contain; 
    transition: transform 0.2s ease; 
} 

.easy-cod-product-image-container img:active { 
    transform: scale(0.98); 
} 

/* ======== PRICE DISPLAY - MOBILE OPTIMIZED ======== */ 
.easy-cod-price-wrapper { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px; /* Reduced from 8px */
    margin-bottom: 16px; /* Reduced from 20px */
    flex-wrap: wrap; 
} 

.easy-cod-product-price { 
    font-size: 20px; /* Reduced from 22px */
    font-weight: 700; 
    color: #2c3e50; 
} 

#easy-cod-regular-price { 
    font-size: 14px; /* Reduced from 16px */
    color: #e74c3c; 
    text-decoration: line-through; 
    opacity: 0.8; 
    font-weight: 400; 
} 

.easy-cod-price-container.has-regular-price #easy-cod-product-price { 
    color: #27ae60; 
} 

/* ======== FORM STYLING - MOBILE FIRST ======== */ 
.easy-cod-popup-form { 
    width: 100%; 
} 

.easy-cod-popup-form label { 
    display: block; 
    margin-bottom: 4px; /* Reduced from 6px */
    font-weight: 500; 
    font-size: 14px; /* Reduced from 15px */
    color: #333 !important; /* Slightly softer black */
} 

.easy-cod-popup-form input[type="text"], 
.easy-cod-popup-form input[type="tel"], 
.easy-cod-popup-form input[type="email"], 
.easy-cod-popup-form textarea { 
    width: 100%; 
    padding: 10px 12px; /* Reduced padding */
    margin-bottom: 12px; /* Reduced from 16px */
    border: 1px solid #e0e0e0; /* Thinner border */
    border-radius: 6px; /* Slightly smaller radius */
    font-size: 14px; /* Reduced from 15px */
    background: #fff; /* White background */
    transition: all 0.2s ease; 
    -webkit-appearance: none; 
    appearance: none; 
    -webkit-tap-highlight-color: transparent; 
    color: #333 !important; /* Softer black */
    box-sizing: border-box;
    height: 42px; /* Fixed height for better alignment */
} 

.easy-cod-popup-form input:focus, 
.easy-cod-popup-form textarea:focus { 
    outline: none; 
    border-color: #3498db; 
    background: #fff; 
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1); 
    transform: translateY(-1px); 
} 

.easy-cod-popup-form textarea { 
    min-height: 60px;
    max-height: 120px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
    padding: 12px 14px;
} 

/* ======== ERROR STATES ======== */ 
.easy-cod-popup-form input.error, 
.easy-cod-popup-form textarea.error { 
    border-color: #e74c3c; 
    background-color: rgba(231, 76, 60, 0.05); 
    animation: shake 0.6s ease-in-out; 
} 

/* Shake animation for form validation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

/* Shake animation for submit button */
@keyframes gentleShake {
    0%, 100% { transform: translateX(0) scale(1); }
    25% { transform: translateX(-2px) rotate(-1deg); }
    75% { transform: translateX(2px) rotate(1deg); }
}

/* Apply gentle shake to submit button on hover */
.easy-cod-popup-form button[type="submit"]:hover {
    animation: gentleShake 0.8s ease-in-out infinite;
}

/* ======== SUBMIT BUTTON - MOBILE OPTIMIZED ======== */ 
.easy-cod-popup-form button[type="submit"] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 16px;
    background: var(--primary-color);
    color: white !important;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
    animation: gentlePulse 3s ease-in-out infinite;
}

/* Hover and active states */
.easy-cod-popup-form button[type="submit"]:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.easy-cod-popup-form button[type="submit"]:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Loading state */
.easy-cod-popup-form button[type="submit"].loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.easy-cod-popup-form button[type="submit"].loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease-in-out infinite;
}

/* Gentle pulse animation */
@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Loading spinner animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Cart icon styles */
.easy-cod-cart-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

/* Button text styles */
.easy-cod-button-text {
    display: inline-block;
    vertical-align: middle;
}

/* Loading state - hide icon when loading */
.easy-cod-popup-form button[type="submit"].loading .easy-cod-cart-icon {
    display: none;
} 

.easy-cod-popup-form button[type="submit"]:active { 
    transform: translateY(1px); 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); 
    background: #333333;
} 

.easy-cod-popup-form button[type="submit"]:disabled { 
    background: #666666;
    opacity: 0.8; 
    transform: none; 
    cursor: not-allowed; 
    color: #ffffff !important;
} 

/* ======== LOADING SPINNER ======== */ 
.easy-cod-popup-form button[type="submit"].loading { 
    pointer-events: none; 
} 

.easy-cod-popup-form button[type="submit"].loading .spinner { 
    display: inline-block; 
    width: 20px; 
    height: 20px; 
    border: 2px solid rgba(255, 255, 255, 0.3); 
    border-top-color: #fff; 
    border-radius: 50%; 
    animation: spin 1s linear infinite; 
    margin-right: 10px; 
    vertical-align: middle; 
} 

@keyframes spin { 
    to { transform: rotate(360deg); }
}

/* ======== ORDER INFO - MOBILE OPTIMIZED ======== */ 
.easy-cod-order-info { 
    margin-bottom: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: none;
    border-radius: 12px;
    border-left: 4px solid #3498db;
}

.easy-cod-order-info h3 { 
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

/* ======== NOTIFICATIONS - MOBILE OPTIMIZED ======== */
.easy-cod-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 10001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideUpNotification 0.3s ease-out;
    text-align: center;
    font-size: 15px;
    line-height: 1.4;
}

@keyframes slideUpNotification {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.easy-cod-notification.success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.easy-cod-notification.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

/* ======== BODY SCROLL LOCK ======== */
body.easy-cod-popup-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    -webkit-overflow-scrolling: touch;
}

/* ======== TEMPLATE VARIATIONS - MOBILE OPTIMIZED ======== */

/* Default Template */
.template-default .easy-cod-popup-container {
    border-radius: 16px 16px 0 0;
}

.template-default-title {
    color: #2c3e50;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 12px;
}

.template-default-button {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

/* Modern Template */
.template-modern .easy-cod-popup-container {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-top: 3px solid #3498db;
}

.template-modern-title {
    color: #2c3e50;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
}

.template-modern-button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.template-modern-input {
    border: 2px solid #bdc3c7;
    background: #ffffff;
}

.template-modern-input:focus {
    border-color: #3498db;
    background: #fff;
}

/* Minimal Template */
.template-minimal .easy-cod-popup-container {
    background: #ffffff;
    border-top: 1px solid #000;
}

.template-minimal-title {
    color: #000;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.template-minimal-input {
    border: none;
    border-bottom: 1px solid #bdc3c7;
    border-radius: 0;
    background: transparent;
}

.template-minimal-input:focus {
    border-bottom-color: #000;
}

.template-minimal-button {
    background: #000;
    border-radius: 0;
}

/* ======== RESPONSIVE BREAKPOINTS ======== */

/* Small phones (320px - 480px) */
@media (max-width: 480px) {
    .easy-cod-popup-container {
        padding: 16px 12px 12px;
    }
    
    .easy-cod-popup-container h2 {
        font-size: 18px;
        margin-bottom: 16px;
    }
    
    .easy-cod-product-image-container img {
        max-height: 140px;
    }
    
    .easy-cod-popup-form input,
    .easy-cod-popup-form textarea {
        padding: 14px 12px;
        margin-bottom: 14px;
        font-size: 16px;
    }
    
    .easy-cod-popup-form button[type="submit"] {
        padding: 16px 18px;
        font-size: 15px;
    }
}

/* Very small phones (280px - 320px) */
@media (max-width: 320px) {
    .easy-cod-popup-container {
        padding: 12px 8px 8px;
        border-radius: 12px 12px 0 0;
    }
    
    .easy-cod-popup-container h2 {
        font-size: 16px;
        margin-bottom: 12px;
        padding-right: 40px;
    }
    
    .easy-cod-popup-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
        top: 8px;
        right: 8px;
    }
    
    .easy-cod-product-image-container {
        margin-bottom: 12px;
    }
    
    .easy-cod-product-image-container img {
        max-height: 100px;
        border-radius: 8px;
        padding: 4px;
    }
    
    .easy-cod-popup-form label {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .easy-cod-popup-form input,
    .easy-cod-popup-form textarea {
        padding: 12px 10px;
        margin-bottom: 10px;
        border-radius: 8px;
    }
    
    .easy-cod-popup-form textarea {
        min-height: 60px;
    }
    
    .easy-cod-popup-form button[type="submit"] {
        padding: 14px 16px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .easy-cod-order-info {
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 8px;
        font-size: 13px;
    }
    
    .easy-cod-price-wrapper {
        margin-bottom: 12px;
    }
    
    .easy-cod-product-price {
        font-size: 18px;
    }
    
    #easy-cod-regular-price {
        font-size: 14px;
    }
}

/* Ultra small phones (240px - 280px) */
@media (max-width: 280px) {
    .easy-cod-popup-container {
        padding: 8px 6px 6px;
    }
    
    .easy-cod-popup-container h2 {
        font-size: 14px;
        margin-bottom: 8px;
        line-height: 1.2;
    }
    
    .easy-cod-popup-close {
        width: 32px;
        height: 32px;
        font-size: 18px;
        top: 6px;
        right: 6px;
    }
    
    .easy-cod-product-image-container img {
        max-height: 80px;
        max-width: 80px;
    }
    
    .easy-cod-popup-form label {
        font-size: 12px;
        margin-bottom: 3px;
    }
    
    .easy-cod-popup-form input,
    .easy-cod-popup-form textarea {
        padding: 10px 8px;
        margin-bottom: 8px;
        font-size: 14px;
        border-radius: 6px;
    }
    
    .easy-cod-popup-form textarea {
        min-height: 50px;
    }
    
    .easy-cod-popup-form button[type="submit"] {
        padding: 12px 14px;
        font-size: 13px;
        border-radius: 6px;
    }
    
    .easy-cod-order-info {
        padding: 8px;
        margin-bottom: 8px;
        font-size: 11px;
        border-radius: 6px;
    }
}

/* ======== LANDSCAPE ORIENTATION ======== */
@media (max-height: 600px) and (orientation: landscape) {
    .easy-cod-popup-container {
        max-height: 98vh;
        border-radius: 0;
        position: absolute;
        top: 1vh;
        bottom: 1vh;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 500px;
        animation: scaleIn 0.3s ease;
    }
    
    @keyframes scaleIn {
        from {
            transform: translateX(-50%) scale(0.9);
            opacity: 0;
        }
        to {
            transform: translateX(-50%) scale(1);
            opacity: 1;
        }
    }
    
    .easy-cod-popup-overlay {
        align-items: center;
    }
    
    .easy-cod-product-image-container img {
        max-height: 80px;
    }
    
    .easy-cod-popup-form input,
    .easy-cod-popup-form textarea {
        margin-bottom: 8px;
    }
    
    .easy-cod-order-info {
        margin-bottom: 12px;
        padding: 10px;
    }
}

/* ======== DESKTOP OVERRIDE (min-width: 768px) ======== */
@media (min-width: 768px) {
    .easy-cod-popup-overlay {
        align-items: center;
        padding: 20px;
    }
    
    .easy-cod-popup-container {
        position: relative;
        width: 100%;
        max-width: 500px;
        border-radius: 12px;
        animation: scaleIn 0.3s ease;
        bottom: auto;
        left: auto;
        right: auto;
        margin: 0 auto;
    }
    
    .easy-cod-popup-close:hover {
        background: rgba(230, 230, 230, 0.95);
        transform: scale(1.05);
    }
    
    .easy-cod-popup-form button[type="submit"]:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(44, 62, 80, 0.4);
    }
    
    .template-modern-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    }
}

/* ======== ACCESSIBILITY ENHANCEMENTS ======== */

/* High contrast mode */
@media (prefers-contrast: high) {
    .easy-cod-popup-container {
        border: 2px solid;
    }
    
    .easy-cod-popup-form input,
    .easy-cod-popup-form textarea {
        border-width: 2px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .easy-cod-popup-container {
        background: #ffffff;
        color: #ecf0f1;
    }
    
    .easy-cod-popup-form input,
    .easy-cod-popup-form textarea {
        background: #34495e;
        border-color: #4a6741;
        color: #ecf0f1;
    }
    
    .easy-cod-order-info {
        background: #34495e;
    }
    
    .easy-cod-popup-close {
        background: rgba(52, 73, 94, 0.9);
        color: #ecf0f1;
    }
}

/* ======== PERFORMANCE OPTIMIZATIONS ======== */

/* GPU acceleration for animations */
.easy-cod-popup-container,
.easy-cod-popup-close,
.easy-cod-popup-form button[type="submit"] {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Optimize touch scrolling */
.easy-cod-popup-container {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Prevent zoom on input focus (iOS) */
@media (max-width: 767px) {
    .easy-cod-popup-form input,
    .easy-cod-popup-form textarea,
    .easy-cod-popup-form select {
        font-size: 16px !important;
    }
}

/* ======== UTILITY CLASSES ======== */
.mobile-hidden {
    display: none;
}

@media (min-width: 768px) {
    .mobile-hidden {
        display: block;
    }
    
    .desktop-hidden {
        display: none;
    }
}

/* Safe area support for devices with notches */
@supports (padding: max(0px)) {
    .easy-cod-popup-container {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
}

/* ======== PRINT STYLES ======== */
@media print {
    .easy-cod-popup-overlay {
        display: none !important;
    }
}

/* ======== IMPROVED COLOR SCHEME ======== */
:root {
    --primary-color: #2563eb;       /* Blue-600 - Primary actions */
    --primary-hover: #1d4ed8;     /* Blue-700 - Hover state */
    --text-primary: #1f2937;      /* Gray-800 - Main text */
    --text-secondary: #4b5563;    /* Gray-600 - Secondary text */
    --border-color: #d1d5db;      /* Gray-300 - Borders */
    --bg-light: #f9fafb;          /* Gray-50 - Light backgrounds */
    --success-color: #059669;     /* Green-600 - Success messages */
    --error-color: #dc2626;       /* Red-600 - Error messages */
    --warning-color: #d97706;     /* Amber-600 - Warning messages */
}

/* Form Elements */
.easy-cod-popup-form label,
.easy-cod-popup-form .field-label {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.easy-cod-popup-form input[type="text"],
.easy-cod-popup-form input[type="tel"],
.easy-cod-popup-form input[type="email"],
.easy-cod-popup-form textarea {
    background-color: white;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    width: 100%;
    transition: all 0.2s ease;
}

.easy-cod-popup-form input:focus,
.easy-cod-popup-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

/* Single-line address textarea - Forced styles */
.easy-cod-popup-form textarea.easy-cod-address-textarea,
.easy-cod-popup-form .easy-cod-address-textarea,
.easy-cod-address-textarea {
    min-height: 38px !important;
    height: 38px !important;
    max-height: 38px !important;
    resize: none !important;
    padding: 8px 12px !important;
    line-height: 1.3 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 6px !important;
    border: 1px solid var(--border-color) !important;
    font-size: 14px !important;
    font-family: inherit !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    margin: 0 !important;
    display: block !important;
    background: white !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* Focus state for address textarea */
.easy-cod-popup-form textarea:focus,
.easy-cod-address-textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
    outline: none !important;
}

.easy-cod-popup-form input:focus, 
.easy-cod-popup-form textarea:focus,
.easy-cod-address-textarea:focus { 
    outline: none; 
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
} 

/* Styles spécifiques pour mobile */
@media (max-width: 640px) {
    .easy-cod-popup-form textarea.easy-cod-address-textarea,
    .easy-cod-popup-form .easy-cod-address-textarea,
    .easy-cod-address-textarea {
        min-height: 36px !important;
        height: 36px !important;
        max-height: 36px !important;
        padding: 6px 10px !important;
        font-size: 14px !important;
    }
    
    .easy-cod-popup-form .form-group {
        margin-bottom: 12px;
    }
    
    .easy-cod-popup-form label {
        font-size: 14px;
        margin-bottom: 6px;
    }
}

/* Buttons */
.easy-cod-popup-form button[type="submit"] {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
}

.easy-cod-popup-form button[type="submit"]:hover {
    background-color: #333333;
    transform: translateY(-1px);
}

/* Hover effect for cart icon */
.easy-cod-popup-form button[type="submit"]:hover .easy-cod-cart-icon {
    transform: scale(1.1);
}

/* Active state - push effect */
.easy-cod-popup-form button[type="submit"]:active .easy-cod-cart-icon {
    transform: scale(0.95);
}

/* Validation States */
.easy-cod-popup-form input.valid,
.easy-cod-popup-form textarea.valid {
    border-color: var(--success-color);
    background-color: rgba(5, 150, 105, 0.05);
}

.easy-cod-popup-form input.invalid,
.easy-cod-popup-form textarea.invalid {
    border-color: var(--error-color);
    background-color: rgba(220, 38, 38, 0.05);
    animation: shake 0.6s ease-in-out;
}

/* Error Messages */
.field-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 4px;
    display: block;
}

/* Price Label and Wrapper */
.easy-cod-price-label {
    color: #000000;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}

.easy-cod-price-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

.easy-cod-price-container {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
}

/* Price Elements */
#easy-cod-product-price {
    color: var(--success-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
    display: inline-block;
    white-space: nowrap;
}

#easy-cod-currency-symbol {
    color: var(--success-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-left: 1px;
    line-height: 1;
    display: inline-block;
    position: relative;
    top: -1px;
}

/* Product Info Block */
.easy-cod-popup-container {
    display: flex;
    flex-direction: column;
}

.easy-cod-product-info {
    display: flex;
    align-items: flex-start; /* Align items to the top */
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 0 0 16px 0;
    border: 1px solid #e9ecef;
    position: relative;
}

.template-default-image {
    flex: 0 0 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    background: white;
    border: 1px solid #e9ecef;
    margin: 0;
}

.template-default-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.easy-cod-product-info-inner {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 70px; /* Match image height */
}

#easy-cod-product-title {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* Move price to the right side */
.easy-cod-price-wrapper {
    margin: 0;
    align-self: flex-end; /* Align price to the right */
    margin-top: auto; /* Push to bottom of container */
}

.easy-cod-price-container {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    vertical-align: middle;
}

/* Price container */
.easy-cod-price-container {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    vertical-align: middle;
}

/* Regular price (strikethrough) */
#easy-cod-regular-price {
    color: #dc2626; /* Red-600 */
    text-decoration: line-through;
    font-size: 1.1rem;
    font-weight: 500;
    display: inline-block;
    margin: 0;
}

/* Placeholder Text */
::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Disabled State */
.easy-cod-popup-form input:disabled,
.easy-cod-popup-form textarea:disabled,
.easy-cod-popup-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: var(--bg-light);
}