:root {
    --afb-primary: #2563eb;
    --afb-primary-dark: #1d4ed8;
    --afb-primary-soft: #eff6ff;
    --afb-surface: #ffffff;
    --afb-surface-muted: #f8fafc;
    --afb-border: #dbe3ef;
    --afb-text: #172033;
    --afb-muted: #64748b;
    --afb-danger: #b42318;
    --afb-success: #087443;
    --afb-radius: 14px;
}

.afb-elementor-widget {
    width: 100%;
    direction: rtl;
}

.afb-elementor-widget .afb-form {
    margin-top: 0;
    margin-bottom: 0;
}

.afb-elementor-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    min-height: 190px;
    padding: 28px;
    color: #475569;
    text-align: center;
    background: linear-gradient(145deg, #f8fbff, #eef4ff);
    border: 1px dashed #93c5fd;
    border-radius: 16px;
    box-shadow: 0 14px 35px rgba(37, 99, 235, .08);
}

.afb-elementor-placeholder .dashicons {
    width: auto;
    height: auto;
    color: #2563eb;
    font-size: 34px;
}

.afb-elementor-placeholder strong {
    color: #172033;
    font-size: 16px;
}

.afb-elementor-placeholder small {
    max-width: 420px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.9;
}

.afb-form {
    --afb-form-primary: var(--afb-primary);
    direction: rtl;
    width: 100%;
    max-width: var(--afb-max-width, 680px);
    margin: 24px auto;
    padding: clamp(20px, 4vw, 34px);
    color: var(--afb-text);
    background: var(--afb-background, var(--afb-surface));
    border: 1px solid var(--afb-border);
    border-radius: var(--afb-radius, 14px);
    box-shadow: 0 18px 55px rgba(15, 23, 42, .08);
    font-family: inherit;
}

.afb-form,
.afb-form * {
    box-sizing: border-box;
}

.afb-form-fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.afb-form-heading {
    margin: 0 0 22px;
    padding: 0 0 15px;
    border-bottom: 1px solid #dbe3ef;
}

.afb-form-title {
    margin: 0;
    color: #172554;
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 800;
    line-height: 1.35;
}

.afb-field {
    min-width: 0;
}

.afb-field-width-25 {
    grid-column: span 1;
}

.afb-field-width-50 {
    grid-column: span 2;
}

.afb-field-width-75 {
    grid-column: span 3;
}

.afb-field-width-100,
.afb-field-full,
.afb-booking-field {
    grid-column: 1 / -1;
}

.afb-label {
    display: block;
    margin: 0 0 8px;
    color: #263449;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.6;
}

.afb-label span {
    color: var(--afb-danger);
}

.afb-field-description {
    margin: -2px 0 8px;
    color: var(--afb-muted);
    font-size: 12px;
    line-height: 1.8;
}

.afb-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.afb-form textarea,
.afb-form select {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    color: var(--afb-text);
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    font: inherit;
    line-height: 1.6;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.afb-form textarea {
    min-height: 0;
    resize: vertical;
}

.afb-form input::placeholder,
.afb-form textarea::placeholder {
    color: #94a3b8;
}

.afb-form input:focus,
.afb-form textarea:focus,
.afb-form select:focus,
.afb-picker-button:focus-visible,
.afb-time-option:focus-visible,
.afb-modal-nav:focus-visible,
.afb-modal-close:focus-visible {
    border-color: var(--afb-form-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .13);
    outline: none;
}

.afb-choice-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.afb-choice {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 12px;
    color: #334155;
    background: var(--afb-surface-muted);
    border: 1px solid var(--afb-border);
    border-radius: 9px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.afb-choice:hover {
    color: var(--afb-primary-dark);
    border-color: #93c5fd;
    background: var(--afb-primary-soft);
}

.afb-choice:has(input:checked) {
    color: var(--afb-primary-dark);
    border-color: #60a5fa;
    background: var(--afb-primary-soft);
}

.afb-choice input {
    accent-color: var(--afb-form-primary);
}

.afb-date-picker {
    width: 100%;
}

.afb-picker-button {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 58px;
    padding: 10px 14px;
    color: var(--afb-text);
    text-align: right;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease, transform .18s ease;
}

.afb-picker-button:hover:not(:disabled) {
    border-color: #93c5fd;
    background: #fbfdff;
    transform: translateY(-1px);
}

.afb-picker-button:disabled {
    color: #94a3b8;
    background: #f1f5f9;
    border-color: #e2e8f0;
    cursor: not-allowed;
    transform: none;
}

.afb-picker-button.is-selected {
    border-color: #93c5fd;
    background: var(--afb-primary-soft);
}

.afb-picker-icon {
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--afb-primary-dark);
    background: #dbeafe;
    border-radius: 10px;
    font-size: 18px;
    line-height: 1;
}

.afb-picker-button small,
.afb-picker-button strong {
    display: block;
}

.afb-picker-button small {
    margin-bottom: 2px;
    color: var(--afb-muted);
    font-size: 11px;
    font-weight: 600;
}

.afb-picker-button strong {
    color: inherit;
    font-size: 14px;
    font-weight: 750;
}

.afb-booking-field {
    padding: 18px;
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 72%);
    border: 1px solid #dbeafe;
    border-radius: 14px;
}

.afb-booking-field > .afb-label {
    margin-bottom: 10px;
}

.afb-booking-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.afb-booking-pickers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.afb-sublabel {
    display: block;
    margin: 0 0 6px;
    color: #475569;
    font-size: 12px;
    font-weight: 750;
}

.afb-booking-summary,
.afb-booking-message {
    min-height: 20px;
    margin: 12px 0 0;
    color: var(--afb-muted);
    font-size: 12px;
    line-height: 1.8;
}

.afb-booking-message {
    color: var(--afb-danger);
}

.afb-slots-wrap,
.afb-slots {
    display: none;
}

.afb-hint {
    margin: 0;
    color: var(--afb-muted);
    font-size: 12px;
    line-height: 1.8;
}

.afb-error {
    color: var(--afb-danger) !important;
}

.afb-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    margin-top: 24px;
    padding: 12px 24px;
    color: #fff;
    background: var(--afb-form-primary);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-weight: 750;
    transition: background-color .18s ease, opacity .18s ease, transform .18s ease;
}

.afb-submit-button:hover:not(:disabled) {
    background: var(--afb-primary-dark);
    transform: translateY(-1px);
}

.afb-submit-button:disabled {
    opacity: .65;
    cursor: wait;
    transform: none;
}

.afb-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: afb-spin .7s linear infinite;
}

.afb-submit-button.is-loading .afb-spinner {
    display: inline-block;
}

.afb-message {
    display: block;
    min-height: 20px;
    margin-top: 13px;
    font-size: 13px;
    line-height: 1.8;
}

.afb-message:empty {
    display: none;
    min-height: 0;
    margin-top: 0;
}

.afb-message-success {
    color: var(--afb-success);
}

.afb-message-error {
    color: var(--afb-danger);
}

.afb-modal-open {
    overflow: hidden;
}

.afb-modal {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.afb-modal[hidden] {
    display: none;
}

.afb-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .56);
    backdrop-filter: blur(3px);
}

.afb-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    overflow: auto;
    padding: 22px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
    animation: afb-modal-in .18s ease-out;
}

.afb-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 35px;
    padding-left: 35px;
    margin-bottom: 18px;
}

.afb-modal-title,
.afb-modal-header h2 {
    margin: 0;
    color: var(--afb-text);
    font-size: 18px;
    font-weight: 800;
}

.afb-modal-close {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.afb-modal-close:hover {
    color: var(--afb-danger);
    background: #fff1f2;
    border-color: #fecdd3;
}

.afb-modal-body {
    min-width: 0;
}

.afb-modal-hint {
    margin: 0 0 14px;
    padding: 10px 12px;
    color: var(--afb-muted);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.8;
}

.afb-modal-calendar-toolbar {
    display: grid;
    grid-template-columns: 38px 1fr 38px;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.afb-modal-calendar-toolbar strong {
    color: var(--afb-text);
    text-align: center;
    font-size: 15px;
}

.afb-modal-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: var(--afb-primary-dark);
    background: var(--afb-primary-soft);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.afb-modal-nav:hover:not(:disabled) {
    color: #fff;
    background: var(--afb-primary);
}

.afb-modal-nav:disabled {
    color: #cbd5e1;
    background: #f8fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.afb-modal-weekdays,
.afb-modal-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.afb-modal-weekdays {
    margin-bottom: 6px;
}

.afb-modal-weekdays span {
    padding: 4px 0;
    color: var(--afb-muted);
    text-align: center;
    font-size: 11px;
    font-weight: 750;
}

.afb-modal-calendar-blank {
    min-height: 44px;
}

.afb-modal-calendar-day {
    min-height: 44px;
    padding: 6px 3px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.afb-modal-calendar-day:hover:not(:disabled),
.afb-modal-calendar-day.is-available:hover {
    color: var(--afb-primary-dark);
    background: #dbeafe;
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.afb-modal-calendar-day.is-selected {
    color: #fff;
    background: var(--afb-primary);
    border-color: var(--afb-primary);
}

.afb-modal-calendar-day.is-disabled,
.afb-modal-calendar-day:disabled {
    color: #cbd5e1;
    background: #f8fafc;
    border-color: #eef2f7;
    cursor: not-allowed;
    opacity: .9;
}

.afb-time-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.afb-time-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 8px 6px;
    color: var(--afb-primary-dark);
    background: #fff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.afb-time-option:hover:not(:disabled),
.afb-time-option.is-selected {
    color: #fff;
    background: var(--afb-primary);
    border-color: var(--afb-primary);
    transform: translateY(-1px);
}

.afb-time-option.is-blocked,
.afb-time-option:disabled {
    color: #94a3b8;
    background: #f8fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
    opacity: .9;
}

.afb-time-option small {
    display: block;
    margin-top: 4px;
    color: #b42318;
    font-size: 10px;
    font-weight: 600;
}

.afb-form input[type="file"] {
    width: 100%;
    color: #475569;
    font: inherit;
    font-size: 13px;
}

.afb-form input[type="file"]::file-selector-button {
    margin-left: 9px;
    padding: 8px 12px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
}

/* Honeypot remains in the DOM for bots, but is never visible or interactive
 * for real users. Using a clipped box instead of display:none also keeps the
 * server-side trap meaningful for simple automated submissions. */
.afb-form .afb-honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.afb-form [hidden] {
    display: none !important;
}

@keyframes afb-spin {
    to { transform: rotate(360deg); }
}

@keyframes afb-modal-in {
    from { opacity: 0; transform: translateY(8px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
    .afb-form-fields,
    .afb-booking-grid,
    .afb-booking-pickers {
        grid-template-columns: 1fr;
    }

    .afb-form {
        margin: 14px auto;
        padding: 18px;
    }

    .afb-field-width-25,
    .afb-field-width-50,
    .afb-field-width-75,
    .afb-field-width-100,
    .afb-field-full,
    .afb-booking-field {
        grid-column: 1 / -1;
    }

    .afb-modal {
        align-items: flex-end;
        padding: 0;
    }

    .afb-modal-dialog {
        width: 100%;
        max-height: 90vh;
        padding: 18px;
        border-radius: 18px 18px 0 0;
    }

    .afb-time-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.afb-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-bottom: 8px;
}

.afb-label-row .afb-label {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.afb-help-button {
    display: inline-flex;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    color: var(--afb-primary-dark);
    background: #e0edff;
    border: 1px solid #bfdbfe;
    border-radius: 50%;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.afb-help-button:hover,
.afb-help-button:focus-visible {
    color: #fff;
    background: var(--afb-primary);
    border-color: var(--afb-primary);
    outline: none;
    transform: translateY(-1px);
}

.afb-swal-open {
    overflow: hidden;
}

.afb-swal-overlay {
    position: fixed;
    z-index: 1000001;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .58);
    backdrop-filter: blur(5px);
    direction: rtl;
    animation: afb-swal-fade-in .18s ease-out;
}

.afb-swal-popup {
    width: min(460px, 100%);
    padding: 28px 26px 22px;
    color: #172033;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 20px;
    box-shadow: 0 28px 90px rgba(15, 23, 42, .3);
    text-align: center;
    animation: afb-swal-pop-in .2s ease-out;
}

.afb-swal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 14px;
    color: #15803d;
    background: #dcfce7;
    border: 7px solid #f0fdf4;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.afb-swal-info .afb-swal-icon {
    color: #1d4ed8;
    background: #dbeafe;
    border-color: #eff6ff;
    font-family: Georgia, serif;
    font-size: 27px;
}

.afb-swal-error .afb-swal-icon {
    color: #b42318;
    background: #fee4e2;
    border-color: #fff1f0;
}

.afb-swal-title {
    margin: 0;
    color: #172033;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.6;
}

.afb-swal-message {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 2;
    white-space: pre-line;
}

.afb-swal-tracking {
    margin-top: 18px;
    padding: 13px;
    background: #f8fbff;
    border: 1px solid #dbeafe;
    border-radius: 13px;
    text-align: right;
}

.afb-swal-tracking-label {
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-size: 12px;
    font-weight: 750;
}

.afb-swal-tracking-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.afb-swal-tracking-value {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 11px;
    overflow-wrap: anywhere;
    color: #1e3a8a;
    background: #fff;
    border: 1px dashed #93c5fd;
    border-radius: 9px;
    direction: ltr;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .05em;
    text-align: center;
    user-select: all;
}

.afb-swal-tracking-value.is-copy-failed {
    border-color: #fca5a5;
    color: #b42318;
}

.afb-swal-copy,
.afb-swal-close {
    min-height: 40px;
    padding: 8px 13px;
    border-radius: 9px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.afb-swal-copy {
    flex: 0 0 auto;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.afb-swal-copy:hover,
.afb-swal-copy:focus-visible {
    color: #fff;
    background: #2563eb;
    border-color: #2563eb;
    outline: none;
    transform: translateY(-1px);
}

.afb-swal-copy.is-copied {
    color: #166534;
    background: #dcfce7;
    border-color: #86efac;
}

.afb-swal-footer {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.afb-swal-close {
    min-width: 112px;
    color: #fff;
    background: #2563eb;
    border: 1px solid #2563eb;
}

.afb-swal-close:hover,
.afb-swal-close:focus-visible {
    background: #1d4ed8;
    border-color: #1d4ed8;
    outline: none;
    transform: translateY(-1px);
}

@keyframes afb-swal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes afb-swal-pop-in {
    from { opacity: 0; transform: translateY(8px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 480px) {
    .afb-swal-overlay {
        padding: 14px;
    }

    .afb-swal-popup {
        padding: 24px 17px 18px;
        border-radius: 17px;
    }

    .afb-swal-tracking-row {
        align-items: stretch;
        flex-direction: column;
    }

    .afb-swal-copy {
        width: 100%;
    }
}

/* Keep the booking controls readable even when the active theme overrides button hovers. */
.afb-form .afb-picker-button:hover:not(:disabled),
.afb-form .afb-picker-button:hover:not(:disabled) strong {
    color: var(--afb-text) !important;
    background: #f8fbff !important;
    border-color: #60a5fa !important;
}

.afb-form .afb-picker-button:hover:not(:disabled) small {
    color: #64748b !important;
}

.afb-form .afb-picker-button:hover:not(:disabled) .afb-picker-icon {
    color: var(--afb-primary-dark) !important;
    background: #dbeafe !important;
}

.afb-picker-modal .afb-modal-backdrop {
    background: rgba(15, 23, 42, .68);
    backdrop-filter: blur(8px) saturate(120%);
}

.afb-picker-modal .afb-modal-dialog {
    width: min(580px, 100%);
    max-height: min(790px, calc(100vh - 28px));
    overflow: hidden;
    padding: 0;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(191, 219, 254, .9);
    border-radius: 24px;
    box-shadow: 0 32px 100px rgba(15, 23, 42, .36), 0 8px 25px rgba(37, 99, 235, .1);
    animation: afb-picker-modal-in .24s cubic-bezier(.22, 1, .36, 1);
}

.afb-picker-modal .afb-modal-header {
    min-height: 76px;
    padding: 21px 72px 17px 24px;
    margin: 0;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 80%);
    border-bottom: 1px solid #dbeafe;
}

.afb-picker-modal .afb-modal-title,
.afb-picker-modal .afb-modal-header h2 {
    color: #172554;
    font-size: 19px;
    letter-spacing: -.01em;
}

.afb-picker-modal .afb-modal-close {
    top: 18px;
    left: 18px;
    width: 40px;
    height: 40px;
    color: #475569;
    background: rgba(255, 255, 255, .82);
    border-color: #bfdbfe;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(30, 64, 175, .08);
}

.afb-picker-modal .afb-modal-close:hover,
.afb-picker-modal .afb-modal-close:focus-visible {
    color: #b42318;
    background: #fff1f2;
    border-color: #fda4af;
    outline: none;
}

.afb-picker-modal .afb-modal-body {
    max-height: calc(100vh - 132px);
    padding: 21px 24px 26px;
    overflow: auto;
    scrollbar-color: #93c5fd transparent;
    scrollbar-width: thin;
}

.afb-picker-modal .afb-modal-calendar-toolbar {
    align-items: center;
    padding: 9px;
    margin-bottom: 17px;
    background: rgba(239, 246, 255, .82);
    border: 1px solid #dbeafe;
    border-radius: 16px;
}

.afb-picker-modal .afb-modal-calendar-toolbar strong {
    color: #1e3a8a;
    font-size: 16px;
}

.afb-picker-modal .afb-modal-nav {
    width: 40px;
    height: 40px;
    background: #fff;
    border-color: #bfdbfe;
    border-radius: 12px;
    box-shadow: 0 5px 12px rgba(30, 64, 175, .06);
}

.afb-picker-modal .afb-modal-nav:hover:not(:disabled) {
    color: #fff !important;
    background: var(--afb-primary) !important;
    border-color: var(--afb-primary) !important;
}

.afb-picker-modal .afb-modal-weekdays span {
    color: #64748b;
    font-size: 11px;
}

.afb-picker-modal .afb-modal-calendar-grid {
    gap: 7px;
}

.afb-picker-modal .afb-modal-calendar-day {
    min-height: 48px;
    color: #334155;
    background: rgba(255, 255, 255, .9);
    border-color: #dbe3ef;
    border-radius: 13px;
    font-weight: 750;
}

.afb-picker-modal .afb-modal-calendar-day:hover:not(:disabled),
.afb-picker-modal .afb-modal-calendar-day.is-available:hover {
    color: #1d4ed8 !important;
    background: #eff6ff !important;
    border-color: #60a5fa !important;
    transform: translateY(-2px);
}

.afb-picker-modal .afb-modal-calendar-day.is-selected,
.afb-picker-modal .afb-modal-calendar-day.is-selected:hover:not(:disabled) {
    color: #fff !important;
    background: var(--afb-primary) !important;
    border-color: var(--afb-primary) !important;
}

.afb-picker-modal .afb-time-options {
    gap: 11px;
}

.afb-picker-modal .afb-time-option {
    min-height: 62px;
    color: #1d4ed8;
    background: rgba(255, 255, 255, .94);
    border-color: #bfdbfe;
    border-radius: 14px;
    box-shadow: 0 5px 14px rgba(30, 64, 175, .05);
}

.afb-picker-modal .afb-time-option:hover:not(:disabled) {
    color: #1d4ed8 !important;
    background: #eff6ff !important;
    border-color: #60a5fa !important;
    transform: translateY(-2px);
}

.afb-picker-modal .afb-time-option:hover:not(:disabled) small {
    color: #b42318 !important;
}

.afb-picker-modal .afb-time-option.is-selected,
.afb-picker-modal .afb-time-option.is-selected:hover:not(:disabled) {
    color: #fff !important;
    background: var(--afb-primary) !important;
    border-color: var(--afb-primary) !important;
}

.afb-picker-modal .afb-time-option.is-blocked,
.afb-picker-modal .afb-time-option:disabled {
    color: #94a3b8 !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    box-shadow: none;
}

.afb-loading-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 104px;
    margin: 0 0 16px;
    padding: 22px;
    color: #475569;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    border: 1px solid #dbeafe;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 700;
}

.afb-loading-spinner {
    display: inline-block;
    flex: 0 0 21px;
    width: 21px;
    height: 21px;
    border: 3px solid #bfdbfe;
    border-top-color: var(--afb-primary);
    border-radius: 50%;
    animation: afb-spin .7s linear infinite;
}

.afb-picker-button.is-loading {
    cursor: progress;
}

.afb-picker-button.is-loading::after {
    display: inline-block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-inline-start: auto;
    border: 2px solid #bfdbfe;
    border-top-color: var(--afb-primary);
    border-radius: 50%;
    content: '';
    animation: afb-spin .7s linear infinite;
}

.afb-swal-overlay.is-closing {
    pointer-events: none;
    animation: afb-swal-fade-out .2s ease-in forwards;
}

.afb-swal-overlay.is-closing .afb-swal-popup {
    animation: afb-swal-pop-out .2s ease-in forwards;
}

@keyframes afb-picker-modal-in {
    from { opacity: 0; transform: translateY(14px) scale(.975); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes afb-swal-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes afb-swal-pop-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(9px) scale(.97); }
}

@media (max-width: 640px) {
    .afb-picker-modal .afb-modal-dialog {
        width: 100%;
        max-height: 92vh;
        border-radius: 24px 24px 0 0;
    }

    .afb-picker-modal .afb-modal-header {
        padding: 18px 62px 16px 18px;
    }

    .afb-picker-modal .afb-modal-close {
        top: 14px;
        left: 14px;
    }

    .afb-picker-modal .afb-modal-body {
        max-height: calc(92vh - 75px);
        padding: 18px;
    }

    .afb-picker-modal .afb-time-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Final calendar modal layout and availability states */
.afb-picker-modal .afb-modal-calendar-toolbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 9px 58px;
    direction: rtl;
}

.afb-picker-modal .afb-modal-calendar-toolbar strong {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.afb-picker-modal .afb-modal-calendar-toolbar .afb-modal-nav {
    position: absolute;
    top: 9px;
    z-index: 1;
    flex: 0 0 40px;
    margin: 0;
}

.afb-picker-modal .afb-modal-calendar-toolbar .afb-modal-nav-previous {
    right: 9px;
    left: auto;
}

.afb-picker-modal .afb-modal-calendar-toolbar .afb-modal-nav-next {
    right: auto;
    left: 9px;
}

.afb-picker-modal .afb-modal-calendar-day.is-disabled,
.afb-picker-modal .afb-modal-calendar-day:disabled {
    color: #6b7280 !important;
    background: #dfe4ea !important;
    border: 2px solid #9aa7b5 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
    transform: none !important;
}

.afb-picker-modal .afb-modal-calendar-day.is-disabled:hover,
.afb-picker-modal .afb-modal-calendar-day:disabled:hover {
    color: #6b7280 !important;
    background: #dfe4ea !important;
    border-color: #9aa7b5 !important;
    transform: none !important;
}

.afb-picker-modal .afb-modal-calendar-day.is-available:not(.is-selected) {
    color: #1d4ed8 !important;
    background: #f8fbff !important;
    border: 2px solid #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .1), 0 5px 12px rgba(37, 99, 235, .08);
}

.afb-picker-modal .afb-modal-calendar-day.is-selected,
.afb-picker-modal .afb-modal-calendar-day.is-selected:hover:not(:disabled) {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .18), 0 6px 14px rgba(37, 99, 235, .18);
}

.afb-picker-modal .afb-time-option:not(:disabled):not(.is-selected) {
    color: #1d4ed8 !important;
    background: #f8fbff !important;
    border: 2px solid #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .1), 0 5px 14px rgba(37, 99, 235, .08);
}

.afb-picker-modal .afb-time-option.is-blocked,
.afb-picker-modal .afb-time-option:disabled {
    color: #64748b !important;
    background: #dfe4ea !important;
    border: 2px solid #9aa7b5 !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08) !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
    transform: none !important;
}

.afb-picker-modal .afb-time-option.is-blocked:hover,
.afb-picker-modal .afb-time-option:disabled:hover {
    color: #64748b !important;
    background: #dfe4ea !important;
    border-color: #9aa7b5 !important;
    transform: none !important;
}

.afb-picker-modal .afb-time-option.is-blocked:hover small,
.afb-picker-modal .afb-time-option:disabled:hover small {
    color: #64748b !important;
}

.afb-picker-modal .afb-modal-calendar-day.is-available:hover:not(.is-selected),
.afb-picker-modal .afb-modal-calendar-day.is-available:focus-visible:not(.is-selected) {
    color: #1e3a8a !important;
    background: #dbeafe !important;
    border-color: #1d4ed8 !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .18), 0 7px 16px rgba(37, 99, 235, .14);
    outline: none;
    transform: translateY(-2px);
}

.afb-picker-modal .afb-time-option:not(:disabled):not(.is-selected):hover,
.afb-picker-modal .afb-time-option:not(:disabled):not(.is-selected):focus-visible {
    color: #1e3a8a !important;
    background: #dbeafe !important;
    border-color: #1d4ed8 !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .18), 0 7px 18px rgba(37, 99, 235, .14);
    outline: none;
    transform: translateY(-2px);
}

.afb-picker-modal .afb-modal-calendar-day.is-selected:hover:not(:disabled),
.afb-picker-modal .afb-time-option.is-selected:hover:not(:disabled) {
    background: #1d4ed8 !important;
    border-color: #1e40af !important;
    transform: translateY(-2px);
}

.afb-form select:not([multiple]) {
    appearance: none !important;
    -webkit-appearance: none !important;
    padding-left: 42px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364758b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-position: left 13px center;
    background-repeat: no-repeat;
    background-size: 16px 16px;
    cursor: pointer;
}

.afb-picker-modal .afb-modal-calendar-grid {
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
}

.afb-picker-modal .afb-modal-calendar-grid.is-dragging {
    cursor: grabbing;
}

.afb-picker-modal .afb-modal-body.is-month-transition-previous .afb-modal-calendar-toolbar,
.afb-picker-modal .afb-modal-body.is-month-transition-previous .afb-modal-weekdays,
.afb-picker-modal .afb-modal-body.is-month-transition-previous .afb-modal-calendar-grid {
    animation: afb-month-slide-in-right .28s cubic-bezier(.22, 1, .36, 1) both;
}

.afb-picker-modal .afb-modal-body.is-month-transition-next .afb-modal-calendar-toolbar,
.afb-picker-modal .afb-modal-body.is-month-transition-next .afb-modal-weekdays,
.afb-picker-modal .afb-modal-body.is-month-transition-next .afb-modal-calendar-grid {
    animation: afb-month-slide-in-left .28s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes afb-month-slide-in-left {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes afb-month-slide-in-right {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .afb-picker-modal .afb-modal-body.is-month-transition-previous .afb-modal-calendar-toolbar,
    .afb-picker-modal .afb-modal-body.is-month-transition-previous .afb-modal-weekdays,
    .afb-picker-modal .afb-modal-body.is-month-transition-previous .afb-modal-calendar-grid,
    .afb-picker-modal .afb-modal-body.is-month-transition-next .afb-modal-calendar-toolbar,
    .afb-picker-modal .afb-modal-body.is-month-transition-next .afb-modal-weekdays,
    .afb-picker-modal .afb-modal-body.is-month-transition-next .afb-modal-calendar-grid {
        animation: none;
    }
}

/* Persian file picker */
.afb-file-control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 5px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.afb-file-control:focus-within,
.afb-file-control.has-file {
    background: #f8fbff;
    border-color: var(--afb-form-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .11);
}

.afb-file-button {
    display: inline-flex !important;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    margin: 0 !important;
    padding: 0 13px;
    color: #1d4ed8 !important;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 750 !important;
    transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.afb-file-button:hover,
.afb-file-button:focus-visible {
    background: #dbeafe;
    border-color: #93c5fd;
    outline: none;
    transform: translateY(-1px);
}

.afb-file-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 18px;
    line-height: 1;
}

.afb-file-name {
    min-width: 0;
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.afb-file-control.has-file .afb-file-name {
    color: #334155;
    font-weight: 650;
}

.afb-form .afb-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.afb-form .afb-file-input:focus-visible + .afb-file-button {
    outline: 3px solid rgba(37, 99, 235, .18);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .afb-file-control {
        align-items: stretch;
        flex-direction: column;
    }

    .afb-file-button {
        justify-content: center;
    }
}

/* Responsive picker polish */
@media (max-width: 640px) {
    .afb-picker-modal {
        align-items: center;
        padding: 8px;
    }

    .afb-picker-modal .afb-modal-dialog {
        width: calc(100vw - 16px);
        max-height: calc(100svh - 16px);
        border-radius: 20px;
    }

    .afb-picker-modal .afb-modal-header {
        min-height: 66px;
        padding: 16px 56px 14px 15px;
    }

    .afb-picker-modal .afb-modal-header h2 {
        font-size: 16px;
    }

    .afb-picker-modal .afb-modal-body {
        max-height: calc(100svh - 83px);
        padding: 14px 13px 18px;
    }

    .afb-picker-modal .afb-modal-calendar-toolbar {
        min-height: 50px;
        padding: 7px 49px;
        margin-bottom: 12px;
    }

    .afb-picker-modal .afb-modal-calendar-toolbar .afb-modal-nav {
        top: 7px;
        width: 36px;
        height: 36px;
    }

    .afb-picker-modal .afb-modal-calendar-toolbar .afb-modal-nav-previous { right: 7px; }
    .afb-picker-modal .afb-modal-calendar-toolbar .afb-modal-nav-next { left: 7px; }
    .afb-picker-modal .afb-modal-weekdays { gap: 4px; }
    .afb-picker-modal .afb-modal-weekdays span { font-size: 9px; }
    .afb-picker-modal .afb-modal-calendar-grid { gap: 5px; }
    .afb-picker-modal .afb-modal-calendar-day { min-height: 40px; border-radius: 10px; font-size: 12px; }
    .afb-picker-modal .afb-time-options { gap: 7px; max-height: 42vh; overflow-y: auto; padding: 2px; }
    .afb-picker-modal .afb-time-option { min-height: 52px; border-radius: 11px; font-size: 12px; }
}

@media (max-width: 360px) {
    .afb-picker-modal .afb-modal-calendar-day { min-height: 35px; font-size: 11px; }
    .afb-picker-modal .afb-time-options { grid-template-columns: 1fr; }
}

/* Final acceptance polish: normalize icon boxes and modal controls on every viewport. */
.afb-form .dashicons,
.afb-form .dashicons::before {
    box-sizing: border-box;
    vertical-align: middle;
}

.afb-form .afb-picker-icon,
.afb-form .afb-file-button-icon,
.afb-form .afb-help-button,
.afb-form .afb-modal-close,
.afb-form .afb-modal-nav {
    line-height: 1;
    text-align: center;
}

.afb-form .afb-picker-icon,
.afb-form .afb-file-button-icon,
.afb-form .afb-help-button,
.afb-form .afb-modal-close,
.afb-form .afb-modal-nav,
.afb-form .afb-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.afb-form .afb-picker-icon {
    margin: 0;
}

.afb-form .afb-help-button {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
}

.afb-form .afb-picker-button,
.afb-form .afb-file-button,
.afb-form .afb-submit-button,
.afb-form .afb-time-option {
    box-sizing: border-box;
}

.afb-form .afb-modal-close,
.afb-form .afb-modal-nav {
    flex: 0 0 auto;
}

/* Final responsive safeguards for embedded forms and every picker modal. */
.afb-form-fields,
.afb-booking-grid,
.afb-booking-pickers,
.afb-choice-list,
.afb-modal-dialog,
.afb-time-options {
    min-width: 0;
}

.afb-form .afb-choice {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.afb-form .afb-choice input[type="radio"],
.afb-form .afb-choice input[type="checkbox"] {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
}

.afb-form .afb-choice > span {
    min-width: 0;
}

.afb-picker-modal .afb-modal-dialog,
.afb-picker-modal .afb-modal-body {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 640px) {
    .afb-form {
        width: 100%;
        max-width: 100%;
        margin: 10px auto;
        padding: 15px;
        border-radius: 16px;
    }

    .afb-form-fields,
    .afb-booking-grid,
    .afb-booking-pickers {
        gap: 13px;
    }

    .afb-choice-list { gap: 7px; }
    .afb-choice { width: 100%; justify-content: flex-start; }

    .afb-modal {
        max-width: 100vw;
        padding: 8px;
        overflow: hidden;
    }

    .afb-modal-dialog {
        width: 100%;
        max-width: 100%;
        max-height: calc(100svh - 16px);
        padding: 15px;
        border-radius: 18px;
    }

    .afb-modal-body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .afb-picker-modal .afb-time-options { max-height: 44svh; }
}

/* Amount fields stay readable in RTL forms while preserving numeric input behavior. */
.afb-form .afb-amount-input {
    direction: ltr;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Conditional fields enter and leave the form without an abrupt display:none jump. */
.afb-form [data-afb-condition] {
    max-height: var(--afb-condition-height, 1200px);
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: max-height .34s cubic-bezier(.22, 1, .36, 1), opacity .24s ease, transform .34s cubic-bezier(.22, 1, .36, 1);
    will-change: max-height, opacity, transform;
}

.afb-form [data-afb-condition].afb-condition-hidden {
    max-height: 0 !important;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
}

.afb-form:not(.afb-conditions-ready) [data-afb-condition] {
    transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .afb-form [data-afb-condition] {
        transition: none !important;
    }
}

/* Final vertical rhythm pass for the embedded frontend form. */
.afb-form {
    margin: 18px auto;
    padding: clamp(18px, 3.2vw, 28px);
}

.afb-form-fields {
    align-items: start;
    row-gap: 14px;
    column-gap: 16px;
}

.afb-form-heading {
    margin-bottom: 16px;
    padding-bottom: 12px;
}

.afb-form .afb-label-row {
    margin-bottom: 6px;
}

.afb-form .afb-field-description {
    margin: -1px 0 6px;
    line-height: 1.7;
}

.afb-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.afb-form textarea,
.afb-form select {
    min-height: 44px;
    padding: 9px 12px;
}

.afb-form .afb-choice-list {
    gap: 6px;
}

.afb-form .afb-choice {
    min-height: 38px;
    padding: 7px 10px;
}

.afb-form .afb-booking-field {
    padding: 15px;
}

.afb-form .afb-booking-pickers {
    gap: 10px;
    margin-top: 10px;
}

.afb-form .afb-booking-summary,
.afb-form .afb-booking-message {
    margin-top: 10px;
}

.afb-form .afb-submit-button {
    margin-top: 18px;
}

.afb-form .afb-message {
    margin-top: 10px;
}

@media (max-width: 640px) {
    .afb-form {
        margin: 10px auto;
        padding: 15px;
    }

    .afb-form-fields {
        row-gap: 11px;
        column-gap: 12px;
    }

    .afb-form .afb-booking-field {
        padding: 13px;
    }
}
