/* Quick Order Styles - Premium Modern App Style */

/* Base Popup Wrapper */
.qo-popup {
    background: #fff;
    width: 100%;
    max-width: 860px;
    margin: 40px auto;
    position: relative;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.2);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
    overflow: hidden; /* Clips the child backgrounds to the border-radius */
}

.qo-popup *, .qo-popup *::before, .qo-popup *::after {
    box-sizing: inherit;
}

/* Close Button (Modern floating circle) */
button.mfp-close.qo-close-btn,
.qo-close-btn {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    font-size: 24px !important;
    line-height: 1 !important;
    background: #f0f0f0 !important;
    border: none !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: #555 !important;
    z-index: 9999 !important;
    opacity: 1 !important;
    padding: 0 !important;
    box-shadow: none !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

button.mfp-close.qo-close-btn:hover,
.qo-close-btn:hover {
    color: #000 !important;
    background: #e4e4e4 !important;
    transform: rotate(90deg) !important;
}

/* Header - Hidden in favor of inline title */
.qo-header {
    display: none;
}

/* Content Split */
.qo-content {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    background: #fff;
}

/* Left Column: Product Info */
.qo-product-summary {
    width: 45%;
    padding: 40px 30px;
    background: #f8f9fa; /* Very soft cool gray */
    display: flex;
    flex-direction: column;
}

.qo-img-col {
    margin-bottom: 25px;
    text-align: center;
}

.qo-img-col img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.qo-info-col {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.qo-info-col h4 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    color: #111;
}

.qo-price-wrap {
    color: #e53935;
    font-weight: 800;
    font-size: 22px;
    margin-bottom: 25px;
}

/* Variations */
.qo-var-row {
    margin-bottom: 20px;
}

.qo-attr-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Swatches - Pill Style */
.qo-swatches {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.qo-swatch {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #444;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 30px; /* Pill shape */
    transition: all 0.25s ease;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.qo-swatch:hover {
    border-color: #bbb;
    transform: translateY(-1px);
}

.qo-swatch.active {
    border-color: #111;
    background: #111;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Quantity */
.qo-qty-wrap {
    margin-top: auto;
    padding-top: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #eaeaea;
}

.qo-qty-wrap label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin: 0;
}

.qo-qty-wrap input {
    width: 60px !important;
    max-width: 60px !important;
    min-width: 60px !important;
    flex: 0 0 60px !important;
    height: 38px !important;
    padding: 0 8px !important;
    border: none !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #111 !important;
    margin: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

/* Right Column: Form */
#qo-order-form {
    width: 55%;
    padding: 40px 40px 40px 30px;
    background: #fff;
    display: flex;
    flex-direction: column;
}

#qo-order-form::before {
    content: "ĐẶT HÀNG NHANH";
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.5px;
    margin-bottom: 30px;
}

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

.qo-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 13px;
    color: #444;
}

.qo-form-group label .required {
    color: #e53935;
}

/* Modern Inputs with subtle background */
.qo-form-group input[type="text"],
.qo-form-group input[type="tel"],
.qo-form-group textarea {
    width: 100% !important;
    padding: 14px 16px !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    transition: all 0.3s ease !important;
    background: #f4f5f7 !important;
    color: #111 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.qo-form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.qo-form-group input[type="text"]:focus,
.qo-form-group input[type="tel"]:focus,
.qo-form-group textarea:focus {
    background: #fff !important;
    border-color: #111 !important;
    box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.08) !important;
    outline: none !important;
}

.qo-submit-wrap {
    margin-top: auto;
    padding-top: 15px;
}

.qo-submit-wrap button {
    width: 100% !important;
    padding: 16px !important;
    font-size: 15px !important;
    text-transform: uppercase !important;
    font-weight: 800 !important;
    background-color: #111 !important; 
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
    letter-spacing: 1px !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
}

.qo-submit-wrap button:hover {
    background-color: #000 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 24px rgba(0,0,0,0.25) !important;
}

.qo-submit-wrap button:active {
    transform: translateY(0) !important;
}

.qo-submit-wrap button:disabled {
    background-color: #e0e0e0 !important;
    color: #999 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

#qo-form-message {
    margin-top: 15px;
    padding: 14px;
    border-radius: 8px;
    display: none;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.qo-msg-error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.qo-msg-success {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #86efac;
}

/* Fallback Lightbox Overlay */
.qo-lightbox-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.qo-lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.qo-lightbox-overlay .qo-popup {
    margin: 0;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    overflow-y: auto;
}

.qo-lightbox-overlay.active .qo-popup {
    transform: scale(1) translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .qo-popup {
        max-width: 95%;
        margin: 20px auto;
        border-radius: 16px;
    }
    .qo-product-summary, #qo-order-form {
        width: 100%;
        border-right: none;
        padding: 25px;
    }
    button.mfp-close.qo-close-btn,
    .qo-close-btn {
        top: 15px !important;
        right: 15px !important;
    }
}
