/* Frontend Styles */
.wc-qo-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    backdrop-filter: blur(5px);
}

.wc-qo-overlay.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.wc-qo-popup {
    background: #fff;
    border-radius: 8px;
    max-width: 450px;
    width: 95%;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close Button - FIXED */
.wc-qo-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 0, 0, 0.1);
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    line-height: 31px;
    font-weight: bold;
    color: #333;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.wc-qo-close:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
    transform: rotate(90deg) scale(1.1);
}
.wc-qo-close:active {
    transform: rotate(90deg) scale(0.95);
}
.wc-qo-header {
    background: linear-gradient(135deg, #FF6B00 0%, #FF8C00 100%);
    color: #fff;
    padding: 25px 20px;
    text-align: center;
    border-radius: 8px 8px 0 0;
}

.wc-qo-header h2 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #fff;
    font-weight: 700;
}

.wc-qo-header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
}

.wc-qo-body {
    padding: 25px 20px;
}

/* Summary Section */
.wc-qo-summary {
    background: #f9f9f9;
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.wc-qo-summary h3 {
    margin: 0 0 15px 0;
    font-size: 15px;
    color: #333;
    font-weight: 600;
}

.wc-qo-product-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
}

.wc-qo-product-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.wc-qo-product-info {
    flex: 1;
    min-width: 0;
}

.wc-qo-product-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
    word-wrap: break-word;
}

.wc-qo-product-price {
    font-weight: 700;
    color: #FF6B00;
    font-size: 16px;
}

.wc-qo-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
}

.wc-qo-summary-total {
    font-size: 17px;
    font-weight: 700;
    color: #FF6B00;
    border-top: 2px solid #ddd;
    padding-top: 12px;
    margin-top: 12px;
}

/* Form Styling */
.wc-qo-checkout-form {
    margin-bottom: 20px;
}

.wc-qo-checkout-form .form-row {
    margin-bottom: 15px;
}

.wc-qo-checkout-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.wc-qo-checkout-form .required {
    color: #e74c3c;
}

.wc-qo-checkout-form input[type="text"],
.wc-qo-checkout-form input[type="email"],
.wc-qo-checkout-form input[type="tel"],
.wc-qo-checkout-form textarea,
.wc-qo-checkout-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.wc-qo-checkout-form input:focus,
.wc-qo-checkout-form select:focus,
.wc-qo-checkout-form textarea:focus {
    border-color: #FF6B00;
    outline: none;
}

.wc-qo-checkout-form .woocommerce-input-wrapper {
    display: block;
    width: 100%;
}

/* Delivery Options */
.wc-qo-delivery,
.wc-qo-payment {
    background: #f9f9f9;
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.wc-qo-delivery h3,
.wc-qo-payment h3 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #333;
    font-weight: 600;
}

.wc-qo-delivery-option,
.wc-qo-payment-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
}

.wc-qo-delivery-option:hover,
.wc-qo-payment-option:hover {
    border-color: #FF6B00;
    background: #fff5f0;
}

.wc-qo-delivery-option.selected,
.wc-qo-payment-option.selected {
    border-color: #FF6B00;
    background: #fff5f0;
}

.wc-qo-delivery-option input[type="radio"],
.wc-qo-payment-option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    accent-color: #FF6B00;
}

.wc-qo-delivery-label,
.wc-qo-payment-label {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
}

.wc-qo-payment-label small {
    display: block;
    font-weight: 400;
    color: #666;
    margin-top: 4px;
}

.wc-qo-delivery-price {
    font-weight: 700;
    color: #FF6B00;
    font-size: 15px;
}

/* Submit Button */
.wc-qo-submit-btn {
    background: linear-gradient(135deg, #FF6B00 0%, #FF8C00 100%);
    color: #fff;
    border: none;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.wc-qo-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #e66000 0%, #e67e00 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 0, 0.4);
}

.wc-qo-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wc-qo-footer-note {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-top: 12px;
    margin-bottom: 0;
}

/* Thank You Section */
.wc-qo-thankyou {
    display: none;
    text-align: center;
    padding: 50px 30px;
}

.wc-qo-thankyou.active {
    display: block;
}

.wc-qo-thankyou-icon {
    font-size: 70px;
    margin-bottom: 20px;
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.wc-qo-thankyou h2 {
    color: #27ae60;
    margin-bottom: 12px;
    font-size: 22px;
}

.wc-qo-order-number {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    font-weight: 600;
    color: #333;
    border: 1px solid #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-qo-popup {
        width: 98%;
        max-height: 98vh;
        border-radius: 0;
    }
    
    .wc-qo-header {
        border-radius: 0;
    }
    
    .wc-qo-body {
        padding: 20px 15px;
    }
}