/* Mua Ngay Popup Styles - Premium Glassmorphism */
.mua-ngay-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mua-ngay-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mua-ngay-modal {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    width: 90%;
    max-width: 450px;
    padding: 30px;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    color: #333;
}

/* Fallback for light mode to ensure contrast */
@media (prefers-color-scheme: light) {
    .mua-ngay-modal {
        background: rgba(255, 255, 255, 0.85);
    }
}

.mua-ngay-overlay.active .mua-ngay-modal {
    transform: translateY(0);
}

.mua-ngay-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #555;
    transition: color 0.2s;
}

.mua-ngay-close:hover {
    color: #ff4d4f;
}

.mua-ngay-modal h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.mua-ngay-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #4a4a4a;
}

.mua-ngay-form-group input,
.mua-ngay-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.mua-ngay-form-group input:focus,
.mua-ngay-form-group textarea:focus {
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.mua-ngay-submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
}

.mua-ngay-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(118, 75, 162, 0.4);
}

.mua-ngay-submit-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.mua-ngay-message {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    display: none;
    padding: 10px;
    border-radius: 8px;
}

.mua-ngay-message.success {
    display: block;
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.mua-ngay-message.error {
    display: block;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Group buttons on single product */
.btn-group-custom {
    display: flex !important;
    gap: 10px !important;
    width: 100% !important;
    margin-top: 15px !important;
}

/* Override WooCommerce Button */
.btn-mua-ngay-custom {
    display: inline-block !important;
    padding: 10px 20px !important;
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-weight: bold !important;
    border-radius: 8px !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border: none !important;
    flex: 1 !important;
    width: auto !important;
    box-shadow: 0 4px 15px rgba(255, 75, 43, 0.4) !important;
    text-transform: uppercase !important;
    text-indent: 0 !important;
    letter-spacing: normal !important;
}
.btn-mua-ngay-custom::before,
.btn-mua-ngay-custom::after {
    display: none !important;
}
.btn-mua-ngay-custom:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 75, 43, 0.6) !important;
    color: #ffffff !important;
}

.btn-goi-lai-custom {
    display: inline-block !important;
    padding: 10px 20px !important;
    background: linear-gradient(135deg, #36D1DC 0%, #5B86E5 100%) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-weight: bold !important;
    border-radius: 8px !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border: none !important;
    flex: 1 !important;
    width: auto !important;
    box-shadow: 0 4px 15px rgba(91, 134, 229, 0.4) !important;
    text-transform: uppercase !important;
    text-indent: 0 !important;
    letter-spacing: normal !important;
}
.btn-goi-lai-custom:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(91, 134, 229, 0.6) !important;
    color: #ffffff !important;
}

