/* Popup Modal Styles */
#order-popup-modal {
    display: none; /* Remove the !important */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10000 !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0,0,0,0.5) !important;
}

/* Add this new class for when modal is shown */
#order-popup-modal.show {
    display: flex !important;
}

.popup-overlay {
    background: rgba(0, 0, 0, 0.7);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.popup-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: popupFadeIn 0.3s ease;
}

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

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px 25px;
    border-bottom: 1px solid #e2e8f0;
}

.popup-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3em;
    font-weight: 600;
}

.popup-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: #f1f5f9;
    color: #0073aa;
}

#order-details-form {
    padding: 25px;
}

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

.popup-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
    font-size: 0.9em;
}

.popup-form-group input,
.popup-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    font-size: 0.9em;
    color: #2c3e50;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.popup-form-group input:focus,
.popup-form-group textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.popup-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.popup-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.btn-cancel,
.btn-submit {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cancel {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.btn-cancel:hover {
    background: #e9ecef;
    color: #333;
}

.btn-submit {
    background: linear-gradient(135deg, #0073aa, #005177);
    color: white;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #005177, #003d5a);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.popup-message {
    margin-top: 15px;
    padding: 0;
    text-align: center;
}

.popup-message .loading,
.popup-message .success,
.popup-message .error {
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
}

.popup-message .loading {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.popup-message .success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.popup-message .error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Mobile responsive for popup */
@media (max-width: 768px) {
    .popup-overlay {
        padding: 10px;
    }
    
    .popup-content {
        max-height: 95vh;
    }
    
    .popup-header {
        padding: 15px 20px 10px 20px;
    }
    
    .popup-header h3 {
        font-size: 1.1em;
    }
    
    #order-details-form {
        padding: 20px;
    }
    
    .popup-form-group {
        margin-bottom: 15px;
    }
    
    .popup-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-cancel,
    .btn-submit {
        width: 100%;
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .popup-overlay {
        padding: 5px;
    }
    
    .popup-header {
        padding: 12px 15px 8px 15px;
    }
    
    #order-details-form {
        padding: 15px;
    }
    
    .popup-form-group input,
    .popup-form-group textarea {
        padding: 10px 12px;
        font-size: 0.85em;
    }
}