/* WhatsApp Order Modal Styles */
.whatsapp-order-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px);
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.whatsapp-order-modal.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.whatsapp-modal-content {
    background: white !important;
    border-radius: 20px !important;
    max-width: 480px !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    position: relative !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(30px) scale(0.95) !important;
    transition: transform 0.3s ease !important;
    z-index: 100000 !important;
}

.whatsapp-order-modal.active .whatsapp-modal-content {
    transform: translateY(0) scale(1);
}

.whatsapp-modal-header {
    background: linear-gradient(135deg, #128C7E 0%, #25D366 100%);
    color: white;
    padding: 25px 25px 20px;
    border-radius: 20px 20px 0 0;
    position: relative;
    text-align: center;
}

.whatsapp-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.whatsapp-modal-header .whatsapp-icon {
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.whatsapp-modal-body {
    padding: 30px 25px;
}

.product-preview {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.product-preview img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #128C7E;
}

.product-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}

.whatsapp-product-price {
    color: #128C7E;
    font-weight: 700;
    font-size: 1.2rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.form-control-modern {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #fafbfc;
}

.form-control-modern:focus {
    outline: none;
    border-color: #128C7E;
    background: white;
    box-shadow: 0 0 0 3px rgba(18, 140, 126, 0.1);
}

.whatsapp-quantity-selector {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    background: #f8f9fa !important;
    border-radius: 12px !important;
    padding: 10px 15px !important;
    justify-content: center !important;
}

.whatsapp-quantity-btn {
    background: #128C7E !important;
    color: white !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.whatsapp-quantity-btn:hover {
    background: #0d6b5e !important;
    transform: scale(1.05) !important;
}

.whatsapp-quantity-btn:disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.whatsapp-quantity-display {
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    color: #333 !important;
    min-width: 30px !important;
    text-align: center !important;
}

.delivery-time-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.time-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.time-option.selected {
    background: #128C7E;
    color: white;
    border-color: #128C7E;
}

.time-option:hover {
    border-color: #128C7E;
    background: #f0f8f7;
}

.time-option.selected:hover {
    background: #0d6b5e;
}

.order-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 25px 0;
    border-left: 4px solid #128C7E;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-row:last-child {
    margin-bottom: 0;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
    font-weight: 700;
    color: #128C7E;
}

.whatsapp-submit-btn {
    background: linear-gradient(135deg, #128C7E 0%, #25D366 100%);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 18px 25px;
    width: 100%;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.whatsapp-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(18, 140, 126, 0.3);
}

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

.whatsapp-submit-btn i {
    font-size: 1.3rem;
}

.location-input-wrapper {
    position: relative;
}

.location-detect-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #128C7E;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.location-detect-btn:hover {
    background: #0d6b5e;
}

.special-instructions {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
}

.special-instructions h5 {
    color: #856404;
    margin: 0 0 10px 0;
    font-size: 0.9rem;
}

.special-instructions textarea {
    background: white;
    border: 1px solid #ffeaa7;
    resize: vertical;
    min-height: 60px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .whatsapp-order-modal {
        padding: 10px;
        align-items: flex-end;
    }
    
    .whatsapp-modal-content {
        border-radius: 20px 20px 0 0;
        max-height: 85vh;
    }
    
    .whatsapp-modal-header {
        padding: 20px 20px 15px;
    }
    
    .whatsapp-modal-body {
        padding: 25px 20px;
    }
    
    .product-preview {
        padding: 15px;
    }
    
    .quantity-selector {
        justify-content: center;
    }
    
    .delivery-time-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .whatsapp-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .product-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .delivery-time-options {
        grid-template-columns: 1fr;
    }
}
