/* AYIN_CHECKOUT_UI_HOTFIX_R30C5B_START */

/* تكبير الإجمالي والسعر قليلًا مع إزالة الخط العريض */
body.ayin-page.checkout-page .checkout-total > span {
    font-size: 1.28rem !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
}

body.ayin-page.checkout-page .checkout-total > strong {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;

    font-size: 1.27rem !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
}

body.ayin-page.checkout-page .checkout-total [data-order-total] {
    font-size: 1.32rem !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
}

body.ayin-page.checkout-page .checkout-total small {
    font-size: 1.07rem !important;
    font-weight: 400 !important;
}

/* حقل المحافظة */
body.ayin-page.checkout-page
.checkout-form-grid > label:has(select[name="governorate"]) {
    position: relative !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
    isolation: isolate !important;
    z-index: 50 !important;
}

/* الحقل الأصلي كحل احتياطي */
body.ayin-page.checkout-page
.checkout-form-grid select[name="governorate"] {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;

    padding-inline: 13px 40px !important;

    border: 1px solid #d9dee7 !important;
    border-radius: 14px !important;

    background-color: #fbfcfe !important;
    box-shadow: none !important;

    box-sizing: border-box !important;
}

/* أغلفة القوائم المخصصة المحتملة */
body.ayin-page.checkout-page
.checkout-form-grid > label:has(select[name="governorate"])
:is(.ayin-smart-select, .ts-wrapper, .choices) {
    position: relative !important;
    display: block !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    box-sizing: border-box !important;
}

/* إطار القائمة المخصصة */
body.ayin-page.checkout-page
.checkout-form-grid > label:has(select[name="governorate"])
:is(.ayin-smart-select, .ts-wrapper, .choices) {
    border: 1px solid #d9dee7 !important;
    border-radius: 14px !important;

    background: #fbfcfe !important;
    box-shadow: none !important;
}

/* زر فتح المحافظة */
body.ayin-page.checkout-page
.checkout-form-grid > label:has(select[name="governorate"])
:is(.ayin-smart-select-trigger, .ts-control, .choices__inner) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    height: 46px !important;
    min-height: 46px !important;

    padding: 0 13px !important;

    border: 0 !important;
    border-radius: 14px !important;

    background: transparent !important;
    box-shadow: none !important;

    box-sizing: border-box !important;
}

/* حالة فتح القائمة */
body.ayin-page.checkout-page
.checkout-form-grid > label:has(select[name="governorate"])
:is(.ayin-smart-select, .ts-wrapper, .choices):focus-within {
    border-color: #8fb1ea !important;
    box-shadow: 0 0 0 4px rgba(11, 77, 179, .08) !important;
}

/* إبقاء القائمة تحت الحقل وبنفس عرضه */
body.ayin-page.checkout-page
.checkout-form-grid > label:has(select[name="governorate"])
:is(.ayin-smart-select-menu, .ts-dropdown, .choices__list--dropdown) {
    position: absolute !important;

    top: calc(100% + 7px) !important;
    right: 0 !important;
    left: 0 !important;

    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;

    margin: 0 !important;
    padding: 8px !important;

    transform: none !important;

    border: 1px solid #d9e1ec !important;
    border-radius: 14px !important;

    background: #fff !important;
    box-shadow: 0 16px 38px rgba(5, 31, 67, .16) !important;

    box-sizing: border-box !important;
    overflow: hidden !important;
    z-index: 9999 !important;
}

/* حقل البحث والخيارات داخل القائمة */
body.ayin-page.checkout-page
.checkout-form-grid > label:has(select[name="governorate"])
:is(
    .ayin-smart-select-search,
    .ayin-smart-select-options,
    .ts-dropdown-content,
    .choices__input,
    .choices__list
) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* AYIN_CHECKOUT_UI_HOTFIX_R30C5B_END */

/* AYIN_CHECKOUT_TOTAL_ROW_R30C5C_START */

/*
 * إبقاء عنوان الإجمالي والسعر على سطر واحد:
 * العنوان أقصى اليمين، والسعر أقصى اليسار.
 */
body.ayin-page.checkout-page .checkout-summary .checkout-total {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;

    width: 100% !important;
    min-width: 0 !important;
    min-height: 76px !important;

    gap: 18px !important;
    padding: 14px 20px !important;
    margin-inline: 0 !important;

    direction: rtl !important;
    box-sizing: border-box !important;
}

body.ayin-page.checkout-page .checkout-summary .checkout-total > span {
    display: block !important;
    flex: 0 0 auto !important;

    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;

    text-align: right !important;
    white-space: nowrap !important;
    line-height: 1.25 !important;
}

body.ayin-page.checkout-page .checkout-summary .checkout-total > strong {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: flex-start !important;

    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;

    text-align: left !important;
    white-space: nowrap !important;
    line-height: 1.25 !important;
}

/* منع أي قاعدة هاتف قديمة من تحويل الإجمالي إلى عمود */
@media (max-width: 767px) {
    body.ayin-page.checkout-page .checkout-summary .checkout-total {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;

        min-height: 72px !important;
        gap: 12px !important;
        padding: 12px 16px !important;
    }

    body.ayin-page.checkout-page .checkout-summary .checkout-total > span,
    body.ayin-page.checkout-page .checkout-summary .checkout-total > strong {
        width: auto !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }
}

/* AYIN_CHECKOUT_TOTAL_ROW_R30C5C_END */
