/* =========================================
   1. الأساسيات (French LTR Theme)
   ========================================= */
:root { --cqc-bg: #fff; --cqc-input-bg: #f9fafb; --cqc-border: #e5e7eb; --cqc-focus: #111; --cqc-text: #1f2937; --cqc-btn-bg: #000; --cqc-radius: 8px; }

#cqc-checkout-form-wrapper { background: var(--cqc-bg); border: 1px solid var(--cqc-border); border-radius: var(--cqc-radius); padding: 20px; margin-top: 20px; direction: ltr; text-align: left; }
.cqc-title { font-size: 16px; font-weight: 700; color: var(--cqc-text); margin-bottom: 15px; border-bottom: 1px solid #f3f4f6; padding-bottom: 10px; }

/* Product Info */
.cqc-product-info { background: #f8fafc; border: 1px dashed #cbd5e1; padding: 12px; border-radius: 6px; margin-bottom: 10px; font-size: 13px; color: #334155; }
.cqc-info-row { margin-bottom: 4px; }
.cqc-info-row.main { margin-bottom: 8px; border-bottom: 1px solid #e2e8f0; padding-bottom: 5px; }
.cqc-p-name { font-weight: bold; font-size: 14px; color: #0f172a; }
.cqc-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #4b5563; }

/* Boite Bleue des Variations */
.cqc-selected-vars { background-color: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; padding: 12px; border-radius: 6px; margin-bottom: 15px; font-size: 14px; display: flex; align-items: center; }
.cqc-vars-icon { font-weight: bold; font-size: 16px; margin-right: 8px; color: #2563eb; }
.cqc-vars-content strong { color: #1e40af; }

/* Inputs */
.cqc-input, select.cqc-input { width: 100%; height: 46px; padding: 0 15px; margin-bottom: 15px; border: 1px solid var(--cqc-border); border-radius: 6px; background-color: var(--cqc-input-bg); font-size: 14px; box-sizing: border-box; outline: none; }
.cqc-input:focus { border-color: var(--cqc-focus); box-shadow: 0 0 0 1px var(--cqc-focus); }
select.cqc-input { appearance: none; -webkit-appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") no-repeat right 1rem center; background-size: 1.2em; }

/* Layout */
.cqc-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.cqc-summary { background: #f9fafb; padding: 15px; border-radius: 8px; margin: 15px 0; border: 1px solid #f3f4f6; }
.cqc-row { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 14px; color: #4b5563; }
.cqc-divider { height: 1px; background: #e5e7eb; margin: 10px 0; }
.total { font-weight: 800; color: #000; font-size: 17px; }
.cqc-btn { width: 100%; background: var(--cqc-btn-bg); color: #fff; padding: 16px; border-radius: 8px; font-weight: 700; font-size: 16px; cursor: pointer; border: none; transition: 0.2s; }
.cqc-btn:hover { opacity: 0.9; }
.cqc-trigger-inline { background: #111; color: #fff !important; padding: 12px 25px; border-radius: 50px; font-weight: bold; text-align: center; display: block; width: 100%; margin-top: 10px; cursor: pointer; border: none; }

/* Hide Original Buttons */
#cqc-checkout-form-wrapper ~ button, .woocommerce-variation-add-to-cart .single_add_to_cart_button { display: none !important; }

/* =========================================
   2. ستايل البوب اب (Modal Styles)
   ========================================= */
#cqc-modal {
    position: fixed !important; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 999999; display: none;
    justify-content: center; align-items: center; backdrop-filter: blur(5px);
}
.cqc-modal-content {
    background: #fff; width: 90%; max-width: 600px; max-height: 90vh;
    overflow-y: auto; border-radius: 10px; padding: 20px; position: relative;
}
.cqc-close { position: absolute; top: 10px; right: 15px; font-size: 24px; cursor: pointer; color: #999; }
.cqc-close:hover { color: #000; }

/* =========================================
   3. إجبار ظهور القوائم المنسدلة (Forcing Dropdowns)
   ========================================= */
/* إظهار قوائم Select الأصلية بقوة */
#cqc-modal .variations select {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: 100% !important;
    height: 45px !important;
    padding: 0 10px !important;
    border: 1px solid #ccc !important;
    border-radius: 5px !important;
    background-color: #fff !important;
    margin-bottom: 15px !important;
}

/* إخفاء ستايلات Swatches الشائعة (صور/أزرار) */
#cqc-modal .swatches-select, 
#cqc-modal .vi-wpvs-variation-wrap, 
#cqc-modal .woo-variation-swatches,
#cqc-modal .tawcvs-swatches,
#cqc-modal .variable-items-wrapper {
    display: none !important;
}

/* تحسين شكل جدول الفارييشن */
#cqc-modal .variations td {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
}
#cqc-modal .variations label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}
/* تنسيق الزر الرئيسي (تأكيد الطلب) */
.cqc-btn {
    width: 100%;
    background: var(--cqc-btn-bg);
    color: #fff;
    /* الحشوة: 18px من الأعلى والأسفل، و 24px من اليمين واليسار */
    padding: 18px 24px; 
    border-radius: 8px;
    font-weight: 700;
    font-size: 18px; /* تكبير الخط قليلاً */
    cursor: pointer;
    border: none;
    transition: 0.2s;
    margin-top: 15px; /* مسافة فوق الزر */
}

/* تنسيق أزرار الفتح (شراء سريع / Popup) */
.cqc-trigger-inline{
    /* الحشوة هنا */
    padding: 15px !important;
    font-size: 16px;
}