/* حركة تحديث قيم ملخص الحجز */
.summary-value-updated {
    animation: nabdSummaryValueUpdate 260ms ease;
}

@keyframes nabdSummaryValueUpdate {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحسين انتقال صورة الطبيب */
#summary-doctor-image img {
    transition:
        opacity 250ms ease,
        transform 250ms ease;
}

/* منع انهيار سطر المسمى عند عدم وجود قيمة */
#summary-doctor-specialty:empty,
#summary-doctor-specialty .elementor-widget-container:empty {
    display: none;
}

/* Doctor summary image */
#summary-doctor-image {
    width: 64px;
    min-width: 64px;
    height: 64px;
    flex: 0 0 64px;
}

#summary-doctor-image .elementor-widget-container {
    width: 100%;
    height: 100%;
}

#summary-doctor-image img {
    display: block;
    width: 64px !important;
    height: 64px !important;
    max-width: none !important;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
}

/* Doctor name and job title */
#summary-doctor-name,
#summary-doctor-job {
    width: 100%;
    min-width: 0;
}

#summary-doctor-name .elementor-heading-title {
    margin: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

#summary-doctor-job .elementor-widget-container,
#summary-doctor-job p {
    width: 100%;
    margin: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    overflow-wrap: anywhere;
    line-height: 1.6;
}

/* ==========================================================
 * Nabd Booking UX/UI v2
 * جميع القواعد التالية محصورة داخل صفحة الحجز فقط.
 * ========================================================== */
.nabd-booking-hero {
    --booking-blue: #2f80ed;
    --booking-blue-deep: #0e4f9f;
    --booking-green: #22a06b;
    --booking-red: #d83a52;
    --booking-gray: #aeb8c8;
    --booking-surface: #ffffff;
    --booking-field: #f7f9fc;
    --booking-border: #d9e1ec;
    --booking-radius: 12px;
    --booking-duration: 250ms;
}

/* إخفاء شريط النسبة القديم مع إبقائه في DOM للتوافق. */
.nabd-booking-hero .booking-progress-legacy {
    display: none;
}

/* رأس الرحلة الجديد: رقم الخطوة والعنوان الحالي. */
.nabd-booking-hero .booking-progress-header {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 20px;
    min-height: 44px;
}

.nabd-booking-hero .booking-step-number,
.nabd-booking-hero .booking-step-title {
    width: auto;
    min-width: 0;
}

.nabd-booking-hero .booking-step-number .elementor-heading-title,
.nabd-booking-hero .booking-step-title .elementor-widget-container,
.nabd-booking-hero .booking-step-title p {
    margin: 0;
    line-height: 1.45;
}

.nabd-booking-hero .booking-step-number .elementor-heading-title {
    font-size: clamp(14px, 1.3vw, 16px);
    font-weight: 700;
}

.nabd-booking-hero .booking-step-title .elementor-widget-container,
.nabd-booking-hero .booking-step-title p {
    font-size: clamp(14px, 1.2vw, 16px);
    font-weight: 600;
}

/* بطاقات الملخص وحالاتها الخمس. */
.nabd-booking-hero .booking-step-card {
    position: relative;
    isolation: isolate;
    scroll-margin-block: 96px;
    transition:
        border-color var(--booking-duration) ease,
        box-shadow var(--booking-duration) ease,
        opacity var(--booking-duration) ease,
        transform var(--booking-duration) ease;
}

.nabd-booking-hero .booking-step-card.current-step {
    border-color: var(--booking-blue);
    box-shadow: 0 0 0 3px rgb(47 128 237 / 16%);
}

.nabd-booking-hero .booking-step-card.completed-step {
    border-color: rgb(34 160 107 / 75%);
}

.nabd-booking-hero .booking-step-card.disabled-step {
    opacity: 0.72;
}

.nabd-booking-hero .booking-step-card.step-error {
    border-color: var(--booking-red);
    box-shadow: 0 0 0 3px rgb(216 58 82 / 17%);
}

/* نقطة حالة فعلية داخل Elementor وليست pseudo element. */
.nabd-booking-hero .booking-step-card > .booking-status-dot {
    --width: 16px;
    --min-height: 16px;
    position: absolute;
    inset-inline-end: 15px;
    top: 50%;
    z-index: 3;
    display: block;
    width: 16px;
    min-width: 16px;
    max-width: 16px;
    height: 16px;
    min-height: 16px;
    max-height: 16px;
    padding: 0;
    overflow: hidden;
    flex: 0 0 16px;
    border: 2px solid rgb(255 255 255 / 55%);
    border-radius: 50%;
    background: var(--booking-gray);
    box-shadow:
        0 2px 6px rgb(7 36 78 / 24%),
        inset 0 1px 2px rgb(255 255 255 / 45%);
    transform: translateY(-50%);
    transition:
        background-color var(--booking-duration) ease,
        box-shadow var(--booking-duration) ease,
        transform var(--booking-duration) ease;
}

.nabd-booking-hero .booking-step-card.current-step > .booking-status-dot {
    background: var(--booking-blue);
    box-shadow:
        0 0 0 4px rgb(47 128 237 / 18%),
        0 2px 7px rgb(7 36 78 / 24%);
}

.nabd-booking-hero .booking-step-card.completed-step > .booking-status-dot {
    background: var(--booking-green);
    box-shadow:
        0 0 0 4px rgb(34 160 107 / 16%),
        0 2px 7px rgb(7 36 78 / 24%);
}

.nabd-booking-hero .booking-step-card.step-error > .booking-status-dot {
    background: var(--booking-red);
    box-shadow:
        0 0 0 4px rgb(216 58 82 / 17%),
        0 2px 7px rgb(7 36 78 / 24%);
}

.nabd-booking-hero .booking-card-title .elementor-heading-title {
    margin: 0;
    line-height: 1.45;
}

/* توحيد الحقول مع إبقاء قيمها وأسمائها وسلوك JetFormBuilder كما هو. */
.nabd-booking-hero .jet-form-builder__field:not([type="hidden"]),
.nabd-booking-hero .jet-form-builder__field select,
.nabd-booking-hero .jet-form-builder__field-wrap select,
.nabd-booking-hero .jet-form-builder__field-wrap input:not([type="hidden"]) {
    min-height: 52px;
    padding: 11px 14px;
    border: 1px solid var(--booking-border);
    border-radius: var(--booking-radius);
    background-color: var(--booking-surface);
    color: #17375e;
    line-height: 1.45;
    transition:
        border-color var(--booking-duration) ease,
        box-shadow var(--booking-duration) ease,
        background-color var(--booking-duration) ease;
}

.nabd-booking-hero .jet-form-builder__field:not([type="hidden"]):hover,
.nabd-booking-hero .jet-form-builder__field-wrap select:hover,
.nabd-booking-hero .jet-form-builder__field-wrap input:not([type="hidden"]):hover {
    border-color: #aebbd0;
}

.nabd-booking-hero .jet-form-builder__field:not([type="hidden"]):focus,
.nabd-booking-hero .jet-form-builder__field:not([type="hidden"]):focus-visible,
.nabd-booking-hero .jet-form-builder__field-wrap select:focus,
.nabd-booking-hero .jet-form-builder__field-wrap input:not([type="hidden"]):focus {
    border-color: var(--booking-blue);
    outline: 0;
    box-shadow: 0 0 0 3px rgb(47 128 237 / 16%);
}

.nabd-booking-hero .jet-form-builder__field::placeholder {
    color: #7b8798;
    opacity: 1;
}

/* حقل الهاتف مطابق لبقية الحقول مع خلفية هادئة لمنطقة العلم. */
.nabd-booking-hero .iti,
.nabd-booking-hero .jet-form-builder__field-wrap:has(.iti) {
    width: 100%;
}

.nabd-booking-hero .iti__selected-country,
.nabd-booking-hero .iti__selected-country-primary,
.nabd-booking-hero .iti__flag-container {
    min-height: 50px;
    border-radius: var(--booking-radius) 0 0 var(--booking-radius);
    background-color: #eef2f7;
}

/* توسيط عنوان الموعد والوصف والخط داخل عمود التقويم الحالي. */
.nabd-booking-hero .field-type-appointment-date .content-fullwidth > .booking-appointment-heading,
.nabd-booking-hero .field-type-appointment-date .content-fullwidth > .jet-form-builder__heading-desc,
.nabd-booking-hero .field-type-appointment-date .content-fullwidth > .wp-block-separator {
    align-self: center;
    width: 100%;
    max-width: 620px;
    text-align: center;
}

.nabd-booking-hero .booking-appointment-heading,
.nabd-booking-hero .booking-appointment-heading .jet-form-builder__label-text,
.nabd-booking-hero .jet-form-builder__heading-desc {
    text-align: center;
}

.nabd-booking-hero .field-type-appointment-date .content-fullwidth > .wp-block-separator {
    margin-block: 18px 22px;
    border-color: rgb(14 79 159 / 16%);
}

/* تحسينات التقويم المرئية من دون لمس بيانات JetAppointment. */
.nabd-booking-hero .jet-apb-calendar-wrapper {
    scroll-margin-block: 96px;
}

/*
 * حالة آمنة للتقويم بين تغيير أحد الحقول العليا واكتمال السياق الجديد.
 * تبقى أبعاد التقويم ثابتة، بينما تُحجب التواريخ القديمة عن النقر.
 */
.nabd-booking-hero .appointment-calendar.booking-appointment-pending {
    position: relative;
    min-height: 420px;
}

.nabd-booking-hero .appointment-calendar.booking-appointment-pending .jet-apb-calendar-content {
    pointer-events: none;
    opacity: 0.38;
}

.nabd-booking-hero .appointment-calendar.booking-appointment-pending::after {
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 4;
    content: "بانتظار اكتمال الاختيارات";
    padding: 10px 16px;
    color: var(--booking-blue-deep);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    background: rgb(255 255 255 / 94%);
    border: 1px solid rgb(14 79 159 / 14%);
    border-radius: 999px;
    box-shadow: 0 8px 24px rgb(14 79 159 / 10%);
    transform: translate(-50%, -50%);
}

.nabd-booking-hero .jet-apb-calendar-header,
.nabd-booking-hero .jet-apb-calendar__header {
    min-height: 54px;
    align-items: center;
}

.nabd-booking-hero .jet-apb-calendar-header__label,
.nabd-booking-hero .jet-apb-calendar__title,
.nabd-booking-hero .jet-apb-calendar-title {
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 700;
    line-height: 1.4;
}

.nabd-booking-hero .jet-apb-calendar-nav__prev,
.nabd-booking-hero .jet-apb-calendar-nav__next,
.nabd-booking-hero .jet-apb-calendar-header__prev,
.nabd-booking-hero .jet-apb-calendar-header__next {
    display: inline-grid;
    place-items: center;
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    transition:
        color var(--booking-duration) ease,
        background-color var(--booking-duration) ease,
        transform var(--booking-duration) ease;
}

.nabd-booking-hero .jet-apb-calendar-nav__prev:hover,
.nabd-booking-hero .jet-apb-calendar-nav__next:hover,
.nabd-booking-hero .jet-apb-calendar-header__prev:hover,
.nabd-booking-hero .jet-apb-calendar-header__next:hover {
    background-color: rgb(47 128 237 / 10%);
    transform: scale(1.06);
}

.nabd-booking-hero .jet-apb-calendar-date,
.nabd-booking-hero .jet-apb-calendar__date,
.nabd-booking-hero .jet-apb-calendar-day {
    min-height: 42px;
    border-radius: 10px;
    transition:
        color var(--booking-duration) ease,
        background-color var(--booking-duration) ease,
        box-shadow var(--booking-duration) ease,
        transform var(--booking-duration) ease;
}

.nabd-booking-hero .jet-apb-calendar-date:not(.disabled):hover,
.nabd-booking-hero .jet-apb-calendar__date:not(.disabled):hover,
.nabd-booking-hero .jet-apb-calendar-day:not(.disabled):hover {
    background-color: rgb(47 128 237 / 10%);
    transform: translateY(-1px);
}

.nabd-booking-hero .jet-apb-calendar-date.selected,
.nabd-booking-hero .jet-apb-calendar__date.selected,
.nabd-booking-hero .jet-apb-calendar-day.selected,
.nabd-booking-hero .jet-apb-calendar-date[aria-selected="true"] {
    background-color: var(--booking-blue-deep);
    color: #ffffff;
    box-shadow: 0 6px 16px rgb(14 79 159 / 22%);
}

.nabd-booking-hero .jet-apb-calendar-date.disabled,
.nabd-booking-hero .jet-apb-calendar__date.disabled,
.nabd-booking-hero .jet-apb-calendar-day.disabled,
.nabd-booking-hero .jet-apb-calendar-date[aria-disabled="true"] {
    color: #aeb8c8;
    opacity: 0.58;
    cursor: not-allowed;
}

.nabd-booking-hero .jet-apb-calendar-date.today,
.nabd-booking-hero .jet-apb-calendar__date.today,
.nabd-booking-hero .jet-apb-calendar-day.today {
    box-shadow: inset 0 0 0 1px var(--booking-blue);
}

/* أزرار الأوقات بعد تنسيق النص بواسطة SlotsUI. */
.nabd-booking-hero .jet-apb-slot,
.nabd-booking-hero .jet-apb-time-slot,
.nabd-booking-hero .jet-apb-calendar-slot,
.nabd-booking-hero .jet-apb-slots button,
.nabd-booking-hero .jet-apb-calendar-slots button {
    min-height: 48px;
    border-radius: 10px;
    transition:
        border-color var(--booking-duration) ease,
        background-color var(--booking-duration) ease,
        color var(--booking-duration) ease,
        box-shadow var(--booking-duration) ease,
        transform var(--booking-duration) ease;
}

.nabd-booking-hero .jet-apb-slot:hover,
.nabd-booking-hero .jet-apb-time-slot:hover,
.nabd-booking-hero .jet-apb-calendar-slot:hover,
.nabd-booking-hero .jet-apb-slots button:hover,
.nabd-booking-hero .jet-apb-calendar-slots button:hover {
    border-color: var(--booking-blue);
    box-shadow: 0 5px 14px rgb(14 79 159 / 13%);
    transform: translateY(-1px);
}

/* زر تأكيد الحجز وحالات Hover / Active / Loading. */
.nabd-booking-hero .jet-form-builder__action-button {
    min-height: 52px;
    padding: 12px 24px;
    border-radius: var(--booking-radius);
    box-shadow: 0 8px 20px rgb(14 79 159 / 16%);
    transition:
        background-color var(--booking-duration) ease,
        box-shadow var(--booking-duration) ease,
        transform var(--booking-duration) ease,
        opacity var(--booking-duration) ease;
}

.nabd-booking-hero .jet-form-builder__action-button:hover:not(:disabled) {
    box-shadow: 0 11px 24px rgb(14 79 159 / 24%);
    transform: translateY(-2px);
}

.nabd-booking-hero .jet-form-builder__action-button:active:not(:disabled) {
    box-shadow: 0 4px 10px rgb(14 79 159 / 18%);
    transform: translateY(0) scale(0.99);
}

.nabd-booking-hero .jet-form-builder__action-button:disabled,
.nabd-booking-hero .jet-form-builder__action-button.is-loading {
    opacity: 0.68;
    cursor: wait;
}

/* مؤشر تحميل داخلي يحافظ على أبعاد Select أثناء Auto-Update. */
.nabd-booking-hero .jet-form-builder__field-wrap.booking-is-loading {
    position: relative;
    height: 52px;
    min-height: 52px;
    border-radius: var(--booking-radius);
}

.nabd-booking-hero .jet-form-builder__field-wrap.booking-is-loading::after {
    position: absolute;
    top: 50%;
    inset-inline-end: 38px;
    z-index: 8;
    content: "";
    width: 16px;
    height: 16px;
    margin-top: -8px;
    box-sizing: border-box;
    pointer-events: none;
    border: 2px solid rgb(14 79 159 / 22%);
    border-top-color: var(--booking-primary);
    border-radius: 50%;
    animation: nabdBookingSpinner 650ms linear infinite;
}

.nabd-booking-hero .jet-form-builder__field-wrap.booking-is-loading select:disabled {
    height: 52px;
    min-height: 52px;
    opacity: 1;
    cursor: wait;
    background-color: #fff;
    border-radius: var(--booking-radius);
}

/* حركات الحالات المطلوبة بمدة قصيرة. */
.nabd-booking-hero .booking-step-confirmed {
    animation: nabdBookingConfirm var(--booking-duration) ease;
}

.nabd-booking-hero .booking-step-shake {
    animation: nabdBookingShake var(--booking-duration) ease;
}

.nabd-booking-hero .booking-auto-scroll-target {
    animation: nabdBookingFocus var(--booking-duration) ease;
}

@keyframes nabdBookingSpinner {
    to {
        transform: rotate(360deg);
    }
}

@keyframes nabdBookingConfirm {
    50% {
        transform: scale(1.012);
    }
}

@keyframes nabdBookingShake {
    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

@keyframes nabdBookingFocus {
    from {
        opacity: 0.72;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .nabd-booking-hero.elementor-element.e-con.e-parent {
        overflow-x: clip;
    }

    .nabd-booking-hero .field-type-appointment-date .content-fullwidth,
    .nabd-booking-hero .jet-apb-calendar-wrapper,
    .nabd-booking-hero .appointment-calendar.jet-apb-calendar {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    /* JetAppointment يفرض 620px على المحتوى الداخلي؛ هذا الاستثناء
       محصور في الشاشات الصغيرة ولا يغيّر عرض سطح المكتب. */
    .nabd-booking-hero .jet-apb-calendar-wrapper .appointment-calendar.jet-apb-calendar .jet-apb-calendar-content {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .nabd-booking-hero .booking-step-card > .booking-status-dot {
        inset-inline-end: 12px;
    }

    .nabd-booking-hero .jet-apb-calendar-date,
    .nabd-booking-hero .jet-apb-calendar__date,
    .nabd-booking-hero .jet-apb-calendar-day {
        min-height: 40px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    /* تحويل عمودي النموذج والملخص إلى مسار واحد كامل العرض على الجوال. */
    .nabd-booking-hero.elementor-element .nabd-booking-hero-inner.elementor-element > .e-con-inner {
        flex-direction: column;
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100%;
    }

    .nabd-booking-hero.elementor-element .nabd-booking-hero-copy.elementor-element,
    .nabd-booking-hero.elementor-element .nabd-booking-summary.elementor-element {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }

    .nabd-booking-hero .booking-progress-header {
        align-items: flex-start;
        gap: 4px;
    }

    .nabd-booking-hero .booking-step-number,
    .nabd-booking-hero .booking-step-title {
        width: 100%;
    }

    .nabd-booking-hero .booking-step-card {
        scroll-margin-block: 72px;
    }

    .nabd-booking-hero .booking-step-card > .booking-status-dot {
        inset-inline-end: 10px;
        width: 14px;
        min-width: 14px;
        max-width: 14px;
        height: 14px;
        min-height: 14px;
        max-height: 14px;
    }

    .nabd-booking-hero .jet-apb-calendar-wrapper {
        max-width: 100%;
        overflow-x: auto;
    }

    .nabd-booking-hero .jet-apb-slot,
    .nabd-booking-hero .jet-apb-time-slot,
    .nabd-booking-hero .jet-apb-calendar-slot,
    .nabd-booking-hero .jet-apb-slots button,
    .nabd-booking-hero .jet-apb-calendar-slots button {
        min-height: 46px;
        font-size: 13px;
    }

    .nabd-booking-hero .jet-form-builder__action-button {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* احترام إعدادات النظام وتقليل الحركة عند طلب المستخدم. */
@media (prefers-reduced-motion: reduce) {
    .nabd-booking-hero *,
    .nabd-booking-hero *::before,
    .nabd-booking-hero *::after {
        scroll-behavior: auto;
        animation-duration: 1ms;
        animation-iteration-count: 1;
        transition-duration: 1ms;
    }
}
/* إخفاء خطوة الطبيب كاملة في مسار خدمات الفريق مع إبقاء doctor_id للإرسال. */
.booking-route-hidden,
.booking-route-hidden[aria-hidden="true"] {
    display: none !important;
}

/* ==========================================================
 * Success Modal v2.5.0
 * واجهة نجاح مدمجة وحديثة، دون أي تدخل في منطق الحجز.
 * ========================================================== */
body.nabd-booking-success-modal-open {
    overflow: hidden;
}

.nabd-booking-success-modal[hidden] {
    display: none !important;
}

.nabd-booking-success-modal {
    --nabd-modal-primary: #0e4f9f;
    --nabd-modal-primary-dark: #0a3f82;
    --nabd-modal-primary-soft: #eaf3ff;
    --nabd-modal-success: #22a06b;
    --nabd-modal-success-soft: #e8f8f1;
    --nabd-modal-text: #153354;
    --nabd-modal-muted: #66778d;
    --nabd-modal-border: #dce8f4;
    --nabd-modal-radius: 18px;
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: 18px;
    direction: rtl;
    font-family:
        "Cairo",
        "Tajawal",
        "Segoe UI",
        Tahoma,
        Arial,
        sans-serif;
}

.nabd-booking-success-modal__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at 50% 12%,
            rgb(47 128 237 / 20%),
            transparent 42%
        ),
        rgb(5 25 52 / 74%);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 220ms ease;
}

.nabd-booking-success-modal.is-open
    .nabd-booking-success-modal__backdrop {
    opacity: 1;
}

.nabd-booking-success-modal__dialog {
    position: relative;
    width: min(100%, 930px);
    max-height: calc(100dvh - 24px);
    overflow: auto;
    box-sizing: border-box;
    padding: 22px;
    color: var(--nabd-modal-text);
    text-align: start;
    background:
        linear-gradient(180deg, #fff 0%, #fff 72%, #f9fbfe 100%);
    border: 1px solid rgb(255 255 255 / 70%);
    border-radius: 26px;
    box-shadow:
        0 30px 90px rgb(4 34 73 / 34%),
        0 8px 28px rgb(4 34 73 / 14%);
    opacity: 0;
    transform: scale(0.96);
    transition:
        opacity 260ms ease,
        transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nabd-booking-success-modal.is-open
    .nabd-booking-success-modal__dialog {
    opacity: 1;
    transform: scale(1);
}

.nabd-booking-success-modal__dialog:focus {
    outline: none;
}

.nabd-booking-success-modal__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 2px 17px;
    border-bottom: 1px solid #e7eef6;
}

.nabd-booking-success-modal__mark {
    display: grid;
    flex: 0 0 64px;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0;
    color: var(--nabd-modal-success);
    background: linear-gradient(145deg, #effcf7, #dcf7eb);
    border-radius: 50%;
    box-shadow:
        0 10px 24px rgb(34 160 107 / 17%),
        inset 0 0 0 1px rgb(34 160 107 / 10%);
}

.nabd-booking-success-modal__mark svg {
    width: 48px;
    height: 48px;
    overflow: visible;
}

.nabd-booking-success-modal__mark-circle,
.nabd-booking-success-modal__mark-check {
    fill: none;
    stroke: currentcolor;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nabd-booking-success-modal__mark-circle {
    stroke-width: 3;
    stroke-dasharray: 176;
    stroke-dashoffset: 176;
}

.nabd-booking-success-modal__mark-check {
    stroke-width: 4;
    stroke-dasharray: 42;
    stroke-dashoffset: 42;
}

.nabd-booking-success-modal.is-open
    .nabd-booking-success-modal__mark-circle {
    animation: nabdBookingSuccessCircle 560ms ease forwards;
}

.nabd-booking-success-modal.is-open
    .nabd-booking-success-modal__mark-check {
    animation: nabdBookingSuccessCheck 360ms 360ms ease forwards;
}

.nabd-booking-success-modal h2 {
    margin: 0;
    color: var(--nabd-modal-primary);
    font-size: clamp(23px, 2.5vw, 29px);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.nabd-booking-success-modal #nabd-booking-success-message {
    max-width: 730px;
    margin: 5px 0 0;
    color: var(--nabd-modal-muted);
    font-size: 14.5px;
    line-height: 1.6;
    text-wrap: balance;
}

.nabd-booking-success-modal__content {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
    align-items: stretch;
    gap: 14px;
    margin-top: 16px;
}

.nabd-booking-success-modal__summary {
    padding: 15px 16px;
    text-align: start;
    background: linear-gradient(145deg, #f8fbff, #f1f7fd);
    border: 1px solid var(--nabd-modal-border);
    border-radius: var(--nabd-modal-radius);
    box-shadow:
        inset 0 1px 0 rgb(255 255 255 / 95%),
        0 8px 22px rgb(14 79 159 / 5%);
}

.nabd-booking-success-modal__summary h3,
.nabd-booking-success-modal__next h3,
.nabd-booking-success-modal__newsletter h3 {
    margin: 0 0 10px;
    color: var(--nabd-modal-text);
    font-size: 15.5px;
    font-weight: 800;
    line-height: 1.45;
}

.nabd-booking-success-modal__summary dl {
    margin: 0;
}

.nabd-booking-success-modal__summary dl > div {
    display: grid;
    grid-template-columns: 32px 68px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 42px;
    box-sizing: border-box;
    padding: 5px 2px;
    border-bottom: 1px solid #e3edf7;
}

.nabd-booking-success-modal__summary dl > div:last-child {
    border-bottom: 0;
}

.nabd-booking-success-modal__data-icon {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: var(--nabd-modal-primary);
    background: #fff;
    border: 1px solid #dce9f6;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgb(14 79 159 / 6%);
}

.nabd-booking-success-modal__data-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentcolor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nabd-booking-success-modal__summary dt,
.nabd-booking-success-modal__summary dd {
    margin: 0;
}

.nabd-booking-success-modal__summary dt {
    color: var(--nabd-modal-muted);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.nabd-booking-success-modal__summary dd {
    min-width: 0;
    color: var(--nabd-modal-text);
    font-size: 13.5px;
    font-weight: 750;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nabd-booking-success-modal__summary
    .nabd-booking-success-modal__reference {
    min-height: 40px;
    margin-bottom: 2px;
    padding-inline: 6px;
    background: var(--nabd-modal-primary-soft);
    border: 1px solid #cbdff4;
    border-radius: 11px;
}

.nabd-booking-success-modal__reference dd {
    color: var(--nabd-modal-primary);
    font-size: 15px;
    font-weight: 850;
}

.nabd-booking-success-modal__side {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 12px;
}

.nabd-booking-success-modal__next {
    padding: 14px 15px;
    text-align: start;
    background: #fff;
    border: 1px solid var(--nabd-modal-border);
    border-radius: var(--nabd-modal-radius);
    box-shadow: 0 8px 22px rgb(14 79 159 / 5%);
}

.nabd-booking-success-modal__next ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nabd-booking-success-modal__next li {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 39px;
    box-sizing: border-box;
    padding: 5px 1px;
    color: var(--nabd-modal-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    border-bottom: 1px solid #edf2f7;
}

.nabd-booking-success-modal__next li:last-child {
    border-bottom: 0;
}

.nabd-booking-success-modal__next li > span:last-child {
    min-width: 0;
    max-width: 100%;
    line-height: 1.45;
    text-wrap: balance;
}

.nabd-booking-success-modal__next-icon {
    display: inline-grid;
    flex: 0 0 24px;
    place-items: center;
    width: 24px;
    height: 24px;
    color: var(--nabd-modal-success);
    font-size: 13px;
    font-weight: 900;
    background: var(--nabd-modal-success-soft);
    border-radius: 50%;
}

.nabd-booking-success-modal__newsletter {
    padding: 13px 15px 14px;
    background: linear-gradient(145deg, #f0f7ff, #e8f3ff);
    border: 1px solid #d1e3f6;
    border-radius: var(--nabd-modal-radius);
}

.nabd-booking-success-modal__newsletter h3 {
    margin-bottom: 9px;
    color: var(--nabd-modal-primary);
    font-size: 13.5px;
}

.nabd-booking-success-modal__newsletter-control {
    display: flex;
    gap: 7px;
}

.nabd-booking-success-modal .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.nabd-booking-success-modal__newsletter input {
    min-width: 0;
    height: 42px;
    flex: 1 1 auto;
    box-sizing: border-box;
    padding: 8px 12px;
    color: var(--nabd-modal-text);
    font: inherit;
    font-size: 13px;
    text-align: start;
    background: #fff;
    border: 1px solid #cbdced;
    border-radius: 11px;
    outline: none;
    box-shadow: inset 0 1px 2px rgb(14 79 159 / 4%);
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.nabd-booking-success-modal__newsletter input::placeholder {
    color: #8493a7;
    opacity: 1;
}

.nabd-booking-success-modal__newsletter input:focus {
    border-color: var(--nabd-modal-primary);
    box-shadow: 0 0 0 3px rgb(14 79 159 / 12%);
}

.nabd-booking-success-modal
    .nabd-booking-success-modal__newsletter button {
    flex: 0 0 116px;
    min-width: 116px;
    height: 42px;
    box-sizing: border-box;
    padding: 8px 14px;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    appearance: none;
    background: var(--nabd-modal-primary);
    border: 1px solid var(--nabd-modal-primary);
    border-radius: 11px;
    cursor: pointer;
    transition:
        background-color 180ms ease,
        border-color 180ms ease;
}

.nabd-booking-success-modal
    .nabd-booking-success-modal__newsletter button:hover {
    color: #fff;
    background: var(--nabd-modal-primary-dark);
    border-color: var(--nabd-modal-primary-dark);
}

.nabd-booking-success-modal
    .nabd-booking-success-modal__newsletter button:focus-visible {
    outline: 3px solid rgb(47 128 237 / 28%);
    outline-offset: 2px;
}

.nabd-booking-success-modal
    .nabd-booking-success-modal__newsletter button:disabled {
    color: #fff;
    background: #6f98c8;
    border-color: #6f98c8;
    cursor: not-allowed;
    opacity: 1;
}

.nabd-booking-success-modal
    .nabd-booking-success-modal__newsletter
    button[aria-busy="true"]:disabled {
    cursor: wait;
}

.nabd-booking-success-modal__newsletter
    input[aria-invalid="true"] {
    border-color: #c62828;
    box-shadow: 0 0 0 3px rgb(198 40 40 / 10%);
}

.nabd-booking-success-modal__newsletter-status {
    min-height: 20px;
    margin: 7px 1px 0;
    color: var(--nabd-modal-muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.55;
}

.nabd-booking-success-modal__newsletter-status:empty {
    margin-top: 4px;
}

.nabd-booking-success-modal__newsletter-status.is-error {
    color: #a61b1b;
}

.nabd-booking-success-modal__newsletter-status.is-success {
    color: #176b45;
}

.nabd-booking-success-modal__extensions:empty {
    display: none;
}

.nabd-booking-success-modal__extensions {
    margin-top: 2px;
}

.nabd-booking-success-modal__actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.nabd-booking-success-modal__home,
.nabd-booking-success-modal__again {
    display: inline-flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    box-sizing: border-box;
    padding: 11px 20px;
    font: inherit;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.4;
    text-decoration: none;
    appearance: none;
    background-image: none;
    border-radius: 12px;
    cursor: pointer;
    transition:
        color 200ms ease,
        background-color 200ms ease,
        border-color 200ms ease,
        box-shadow 200ms ease,
        transform 200ms ease;
}

.nabd-booking-success-modal__home {
    color: #fff;
    background-color: var(--nabd-modal-primary);
    background-image: none;
    border: 1px solid var(--nabd-modal-primary);
    box-shadow: 0 9px 20px rgb(14 79 159 / 18%);
}

/*
 * زر الإجراء الثانوي معزول عن أنماط أزرار Elementor العامة.
 * زيادة الخصوصية هنا تمنع لون القالب وحوافه من تغيير هندسة الزر.
 */
.nabd-booking-success-modal
    .nabd-booking-success-modal__again {
    display: inline-flex;
    flex: 0 0 calc(50% - 5px);
    align-items: center;
    justify-content: center;
    height: 46px;
    min-height: 46px;
    box-sizing: border-box;
    padding: 11px 20px;
    color: var(--nabd-modal-primary);
    background-color: #fff;
    background-image: none;
    border: 2px solid var(--nabd-modal-primary);
    border-radius: 12px;
    outline: none;
    box-shadow: none;
    font: inherit;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.4;
    letter-spacing: normal;
    text-align: center;
    text-transform: none;
    text-decoration: none;
    appearance: none;
}

.nabd-booking-success-modal__home:hover,
.nabd-booking-success-modal__again:hover {
    transform: translateY(-1px);
}

.nabd-booking-success-modal__home:hover {
    color: #fff;
    background-color: var(--nabd-modal-primary-dark);
    background-image: none;
    border-color: var(--nabd-modal-primary-dark);
}

.nabd-booking-success-modal
    .nabd-booking-success-modal__again:hover {
    color: var(--nabd-modal-primary);
    background-color: var(--nabd-modal-primary-soft);
    background-image: none;
    border-color: var(--nabd-modal-primary);
    outline: none;
    box-shadow: none;
}

.nabd-booking-success-modal__home:focus-visible {
    outline: 3px solid rgb(47 128 237 / 30%);
    outline-offset: 3px;
}

.nabd-booking-success-modal
    .nabd-booking-success-modal__again:focus,
.nabd-booking-success-modal
    .nabd-booking-success-modal__again:focus-visible {
    color: var(--nabd-modal-primary);
    background-color: var(--nabd-modal-primary-soft);
    background-image: none;
    border-color: var(--nabd-modal-primary-dark);
    outline: none;
    box-shadow: none;
}

.nabd-booking-success-modal
    .nabd-booking-success-modal__again:active {
    color: var(--nabd-modal-primary);
    background-color: #e3effd;
    background-image: none;
    border-color: var(--nabd-modal-primary-dark);
    outline: none;
    box-shadow: none;
    transform: translateY(0) scale(0.99);
}

/* منع رسالة النجاح النصية من الظهور خلف الـModal أو بعد بدء حجز جديد. */
.jet-form-builder.nabd-booking-submit-succeeded
    .jet-form-builder-messages-wrap {
    display: none !important;
}

@keyframes nabdBookingSuccessCircle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes nabdBookingSuccessCheck {
    70% {
        stroke-dashoffset: 0;
        transform: scale(1.04);
        transform-origin: center;
    }

    to {
        stroke-dashoffset: 0;
        transform: scale(1);
        transform-origin: center;
    }
}

/* لا تستخدم نافذة Desktop شريط تمرير؛ التوزيع الأفقي يحافظ على المحتوى كاملًا. */
@media (min-width: 1025px) {
    .nabd-booking-success-modal__dialog {
        max-height: none;
        overflow: visible;
    }
}

@media (min-width: 1025px) and (max-height: 650px) {
    .nabd-booking-success-modal__dialog {
        padding: 16px 20px;
    }

    .nabd-booking-success-modal__header {
        padding-bottom: 12px;
    }

    .nabd-booking-success-modal__mark {
        flex-basis: 54px;
        width: 54px;
        height: 54px;
    }

    .nabd-booking-success-modal__mark svg {
        width: 42px;
        height: 42px;
    }

    .nabd-booking-success-modal__content {
        margin-top: 12px;
    }

    .nabd-booking-success-modal__summary dl > div {
        min-height: 38px;
        padding-block: 3px;
    }

    .nabd-booking-success-modal__next li {
        min-height: 35px;
        padding-block: 3px;
    }

    .nabd-booking-success-modal__actions {
        margin-top: 11px;
    }
}

@media (max-width: 760px) {
    .nabd-booking-success-modal {
        align-items: center;
        padding: 10px;
    }

    .nabd-booking-success-modal__dialog {
        width: 100%;
        max-height: calc(100dvh - 20px);
        padding: 20px 15px 16px;
        border-radius: 20px;
    }

    .nabd-booking-success-modal__header {
        flex-direction: column;
        gap: 10px;
        padding-bottom: 15px;
        text-align: center;
    }

    .nabd-booking-success-modal__mark {
        flex-basis: 60px;
        width: 60px;
        height: 60px;
    }

    .nabd-booking-success-modal__mark svg {
        width: 46px;
        height: 46px;
    }

    .nabd-booking-success-modal h2 {
        font-size: 22px;
    }

    .nabd-booking-success-modal #nabd-booking-success-message {
        margin-top: 6px;
        font-size: 13.5px;
        line-height: 1.65;
    }

    .nabd-booking-success-modal__content {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 13px;
    }

    .nabd-booking-success-modal__summary {
        padding: 12px;
    }

    .nabd-booking-success-modal__summary dl > div {
        grid-template-columns: 30px 62px minmax(0, 1fr);
        gap: 7px;
        min-height: 42px;
    }

    .nabd-booking-success-modal__summary dd {
        font-size: 13px;
    }

    .nabd-booking-success-modal__next {
        padding: 12px;
    }

    .nabd-booking-success-modal__newsletter {
        padding: 12px;
    }

    .nabd-booking-success-modal__actions {
        flex-direction: column;
        gap: 8px;
        margin-top: 12px;
    }

    .nabd-booking-success-modal__home,
    .nabd-booking-success-modal__again {
        flex-basis: auto;
        width: 100%;
    }

    .nabd-booking-success-modal
        .nabd-booking-success-modal__again {
        flex-basis: auto;
    }
}

@media (max-width: 380px) {
    .nabd-booking-success-modal__newsletter-control {
        flex-direction: column;
    }

    .nabd-booking-success-modal
        .nabd-booking-success-modal__newsletter button {
        width: 100%;
        flex-basis: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nabd-booking-success-modal,
    .nabd-booking-success-modal__dialog,
    .nabd-booking-success-modal__mark-circle,
    .nabd-booking-success-modal__mark-check,
    .nabd-booking-success-modal__backdrop,
    .nabd-booking-success-modal__newsletter button,
    .nabd-booking-success-modal__home,
    .nabd-booking-success-modal__again {
        animation-duration: 1ms !important;
        animation-delay: 0ms !important;
        transition-duration: 1ms !important;
    }
}

/* DOC-01S-H-A: fixed information in the existing Form 8164 only. */
.nabd-booking-hero:has(form[data-form-id="8164"][data-nabd-doctor-ux="1"]) {
    overflow-x: clip;
}
.nabd-booking-hero:has(form[data-form-id="8164"][data-nabd-doctor-ux="1"]) .booking-step-card .summary-value {
    min-width: 0;
    overflow-wrap: anywhere;
}
.nabd-booking-hero:has(form[data-form-id="8164"][data-nabd-doctor-ux="1"]) .booking-step-card .booking-card-title {
    flex-shrink: 0;
}
form[data-form-id="8164"][data-nabd-doctor-ux="1"] [data-nabd-fixed-context] {
    width: 100%;
    min-width: 0;
    margin-block-end: 12px;
    direction: rtl;
}
form[data-form-id="8164"][data-nabd-doctor-ux="1"] .nabd-fixed-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 4px 16px;
    align-items: start;
    margin-block-end: 12px;
    min-width: 0;
    text-align: start;
}
form[data-form-id="8164"][data-nabd-doctor-ux="1"] .nabd-fixed-label {
    grid-column: 1;
    grid-row: 1;
    padding-block: 11px;
    color: var(--booking-navy, #174775);
    font-weight: 600;
    overflow-wrap: anywhere;
}
form[data-form-id="8164"][data-nabd-doctor-ux="1"] .nabd-fixed-value {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--booking-border, #dce4ed);
    border-radius: var(--booking-field-radius, 10px);
    background: var(--booking-surface, #fff);
    color: #174775;
    line-height: 1.6;
    overflow-wrap: anywhere;
    cursor: default;
}
form[data-form-id="8164"][data-nabd-doctor-ux="1"] .nabd-fixed-marker {
    grid-column: 2;
    color: #526b82;
    font-size: .75rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
@media (max-width: 480px) {
    form[data-form-id="8164"][data-nabd-doctor-ux="1"] .nabd-fixed-field {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }
    form[data-form-id="8164"][data-nabd-doctor-ux="1"] .nabd-fixed-label {
        padding-block: 0;
    }
    form[data-form-id="8164"][data-nabd-doctor-ux="1"] .nabd-fixed-value {
        grid-column: 1;
        grid-row: 2;
    }
    form[data-form-id="8164"][data-nabd-doctor-ux="1"] .nabd-fixed-marker {
        grid-column: 1;
    }
}

/* Visibility follows the existing appointment invalidation/activation state. */
form[data-form-id="8164"] .field-type-appointment-date:not([data-booking-calendar-ready="true"]),
form[data-form-id="8164"] .field-type-heading-field:has(.booking-appointment-heading) {
    display: none !important;
}
