@import url("https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css");
@import url("https://fonts.googleapis.com/css?family=IBM+Plex+Sans+Arabic:500,700,400");

/* Modal Override Styles — above #mainHeader (z-index 99997) and mobile nav */
#serviceProviderRequestModal {
    z-index: 100002 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#serviceProviderRequestModal.show {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

#serviceProviderRequestModal.show .modal-dialog,
#serviceProviderRequestModal.show .modal-content,
#serviceProviderRequestModal.show .modal-body,
#serviceProviderRequestModal.show .svc-request-modal-shell,
#serviceProviderRequestModal.show .service-request-form,
#serviceProviderRequestModal.show .svc-request-modal__scroll {
    pointer-events: auto !important;
}

#serviceProviderRequestModal .modal-dialog {
    max-width: 600px;
    margin: 1.75rem auto;
    z-index: 100003;
    position: relative;
    max-height: calc(100vh - 3.5rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#serviceProviderRequestModal .modal-content {
    border: none;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 100004;
    max-height: min(90vh, calc(100vh - 3.5rem));
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

#serviceProviderRequestModal .modal-body {
    padding: 0;
    background-color: var(--khames-design-system-colors-gray-white);
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Backdrop when service request modal is open */
body.modal-open .modal-backdrop {
    z-index: 100001 !important;
}

/* Ensure modal backdrop has proper z-index and grey background */
.modal-backdrop {
    z-index: 100001 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Prevent backdrop clicks from closing modal */
.modal-backdrop[data-bs-backdrop="static"] {
    pointer-events: auto !important;
}

.modal-backdrop.show {
    z-index: 100001 !important;
    opacity: 1 !important;
}

.modal-backdrop.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.modal-backdrop.fade.show {
    opacity: 1;
}

/* Ensure modal is positioned correctly when shown */
#serviceProviderRequestModal.fade.show {
    display: block !important;
    z-index: 100002 !important;
    position: fixed !important;
    background-color: rgba(17, 24, 39, 0.55) !important;
}

#serviceProviderRequestModal.show {
    z-index: 100002 !important;
    position: fixed !important;
    display: block !important;
    /* Dim layer: modal covers viewport — backdrop must be on the modal itself */
    background-color: rgba(17, 24, 39, 0.55) !important;
    pointer-events: auto !important;
}

/* Prevent page scroll when create-request modal is open */
html.svc-create-request-open,
html.svc-scroll-locked,
html.modal-open {
    overflow: hidden !important;
}

body.svc-create-request-open,
body.svc-scroll-locked,
body.modal-open {
    overflow: hidden !important;
    width: 100% !important;
}

/* Ensure modal dialog is centered and visible */
#serviceProviderRequestModal.show .modal-dialog {
    transform: translate(0, 0) !important;
    z-index: 100003 !important;
    pointer-events: auto !important;
}

/* Ensure modal body is scrollable on smaller screens */
@media (max-height: 800px) {
    #serviceProviderRequestModal .modal-dialog {
        max-height: 95vh;
    }
    
    #serviceProviderRequestModal .modal-content {
        max-height: 95vh;
    }
    
    #serviceProviderRequestModal .modal-dialog,
    #serviceProviderRequestModal .modal-content,
    #serviceProviderRequestModal .svc-request-modal-shell.create-account {
        max-height: calc(100vh - 2rem);
    }
}

:root {
    --colors-primary-600: rgba(55, 42, 88, 1);
    --colors-primary-500: rgba(106, 93, 139, 1);
    --colors-primary-400: rgba(136, 125, 162, 1);
    --colors-primary-300: rgba(166, 158, 185, 1);
    --colors-primary-200: rgba(195, 190, 209, 1);
    --colors-primary-100: rgba(225, 223, 232, 1);
    --colors-primary-50: rgba(243, 242, 246, 1);
    --colors-additional-success: rgba(73, 160, 120, 1);
    --colors-additional-failure: rgba(219, 58, 52, 1);
    --khames-design-system-colors-gray-white: rgba(255, 255, 255, 1);
    --khames-design-system-colors-gray-darkest: rgba(17, 17, 17, 1);
    --khames-design-system-colors-gray-dark: rgba(102, 102, 102, 1);
    --khames-design-system-colors-gray-lighter: rgba(230, 230, 230, 1);
    --brand-spacing-0: 0px;
}


*{
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

html,
body {
    margin: 0px;
    height: 100%;
}
/* a blue color as a generic focus style */
button:focus-visible {
    outline: 2px solid #4a90e2 !important;
    outline: -webkit-focus-ring-color auto 5px !important;
}

a {
    text-decoration: none;
}

.create-account {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 552px;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 48px 24px;
    position: relative;
    margin: 0 auto;
    background-color: var(--khames-design-system-colors-gray-white);
    border-radius: 24px;
}

    .create-account .logout {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 16px;
        position: relative;
        align-self: stretch;
        width: 100%;
        flex: 0 0 auto;
    }

    .create-account .icon {
        display: flex;
        width: 80px;
        height: 80px;
        align-items: center;
        justify-content: center;
        gap: 8px;
        position: relative;
        background-color: var(--colors-primary-50);
        border-radius: 40px;
        aspect-ratio: 1;
    }

    .create-account .file {
        position: relative;
        width: 32px;
        height: 32px;
        aspect-ratio: 1;
    }

    .create-account .text-wrapper {
        position: relative;
        align-self: stretch;
        font-family: "IBM Plex Sans Arabic", Helvetica;
        font-weight: 700;
        color: var(--khames-design-system-colors-gray-darkest);
        font-size: 24px;
        text-align: center;
        letter-spacing: 0;
        line-height: normal;
    }

    /* Duplicate removed - using updated version from lines 407-445 */

    .create-account .text-field {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        min-height: 0;
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;
        position: relative;
        align-self: stretch;
        width: 100%;
    }

    .create-account .label {
        margin: 0;
        position: relative;
        display: flex;
        align-items: center;
        align-self: stretch;
        z-index: 1;
        font-family: "IBM Plex Sans Arabic", Helvetica;
        font-weight: 500;
        color: var(--khames-design-system-colors-gray-dark);
        font-size: 16px;
        letter-spacing: 0;
        line-height: 1.35;
    }

    /* RTL: align label to right */
    [dir="rtl"] .create-account .label,
    html[dir="rtl"] .create-account .label {
        justify-content: flex-start;
        text-align: right;
        direction: rtl;
    }

    /* LTR: align label to left */
    [dir="ltr"] .create-account .label,
    html[dir="ltr"] .create-account .label {
        justify-content: flex-start;
        text-align: left;
        direction: ltr;
    }

    .create-account .field {
        background-color: var(--khames-design-system-colors-gray-white);
        border: 1px solid;
        border-color: var(--khames-design-system-colors-gray-lighter);
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px;
        position: relative;
        align-self: stretch;
        width: 100%;
        flex: 0 0 auto;
        z-index: 0;
        border-radius: 12px;
        overflow: hidden;
        transition: border-color 0.2s ease;
        cursor: default;
    }

    .create-account .field input {
        cursor: text;
    }

    /* RTL/LTR flex-direction handled in icon positioning section below */

    .create-account .field:focus-within {
        border-color: var(--colors-primary-500);
    }

    .create-account .img {
        position: relative;
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    /* RTL field icon layout: Modal UX fixes (row + direction: rtl) */

    .create-account .placeholder {
        flex: 1;
        font-weight: 400;
        color: var(--khames-design-system-colors-gray-darkest);
        position: relative;
        display: block;
        font-family: "IBM Plex Sans Arabic", Helvetica;
        font-size: 14px;
        letter-spacing: 0;
        line-height: 1.4;
        background: none;
        border: none;
        outline: none;
        width: 100%;
        text-align: start;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        min-width: 0;
    }

    /* RTL Support for placeholder */
    [dir="rtl"] .create-account .placeholder,
    html[dir="rtl"] .create-account .placeholder {
        text-align: right;
    }

    [dir="ltr"] .create-account .placeholder,
    html[dir="ltr"] .create-account .placeholder {
        text-align: left;
    }

    .create-account .div {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        min-height: 0;
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;
        position: relative;
        align-self: stretch;
        width: 100%;
    }

    /* Price field RTL/LTR layout handled in Modal UX fixes section */

    /* Removed duplicate - using updated version below */

    .create-account .span {
        font-weight: 500;
    }

    .create-account .text-wrapper-2 {
        font-family: "saudi_riyal-Regular", Helvetica;
    }

    .create-account .field-2 {
        background-color: var(--colors-primary-50);
        border: 1px dashed;
        border-color: var(--colors-primary-500);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 16px;
        position: relative;
        align-self: stretch;
        width: 100%;
        flex: 0 0 auto;
        z-index: 0;
        border-radius: 12px;
        overflow: hidden;
    }

    /* Removed duplicate - using updated version below */

    .create-account .button {
        all: unset;
        box-sizing: border-box;
        display: flex;
        height: 64px;
        align-items: center;
        justify-content: center;
        padding: 0px 16px;
        position: relative;
        align-self: stretch;
        width: 100%;
        background-color: var(--colors-primary-500);
        border-radius: 16px;
    }

    /* Removed duplicate - using updated version below */
/* Inject original CSS code here */

.create-account {
    display: flex;
    flex-direction: column;
    max-width: 552px;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 48px 24px;
    position: relative;
    background-color: var(--khames-design-system-colors-gray-white);
    border-radius: 24px;
}

    .create-account .logout {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 16px;
        position: relative;
        align-self: stretch;
        width: 100%;
        flex: 0 0 auto;
    }

    .create-account .icon {
        display: flex;
        width: 80px;
        height: 80px;
        align-items: center;
        justify-content: center;
        gap: 8px;
        position: relative;
        background-color: var(--colors-primary-50);
        border-radius: 40px;
        aspect-ratio: 1;
    }

    .create-account .file {
        position: relative;
        width: 32px;
        height: 32px;
        aspect-ratio: 1;
    }

    .create-account .text-wrapper {
        position: relative;
        align-self: stretch;
        font-family: "IBM Plex Sans Arabic", Helvetica;
        font-weight: 700;
        color: var(--khames-design-system-colors-gray-darkest);
        font-size: 24px;
        text-align: center;
        letter-spacing: 0;
        line-height: normal;
        margin: 0;
    }

    /* RTL/LTR support for title */
    [dir="rtl"] .create-account .text-wrapper,
    html[dir="rtl"] .create-account .text-wrapper {
        direction: rtl;
    }

    [dir="ltr"] .create-account .text-wrapper,
    html[dir="ltr"] .create-account .text-wrapper {
        direction: ltr;
    }

    .create-account .cancel {
        position: absolute;
        top: 24px;
        width: 40px;
        height: 40px;
        aspect-ratio: 1;
        background: none;
        border: none;
        padding: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        transition: background-color 0.2s ease;
        border-radius: 8px;
    }

    .create-account .cancel:hover {
        background-color: var(--colors-primary-50);
    }

    /* RTL Support for cancel button - overridden by .service-request-modal-header .cancel */
    [dir="rtl"] .create-account .cancel,
    html[dir="rtl"] .create-account .cancel {
        right: auto;
        left: 24px;
    }

    [dir="ltr"] .create-account .cancel,
    html[dir="ltr"] .create-account .cancel {
        left: auto;
        right: 24px;
    }

        .create-account .cancel img {
            width: 100%;
            height: 100%;
        }

    .create-account .service-request-form {
        display: flex;
        flex-direction: column;
        gap: 24px;
        width: 100%;
    }

    .create-account .text-field {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        min-height: 0;
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;
        position: relative;
        align-self: stretch;
        width: 100%;
    }

    .create-account .label {
        margin: 0;
        position: relative;
        display: flex;
        align-items: center;
        align-self: stretch;
        z-index: 1;
        font-family: "IBM Plex Sans Arabic", Helvetica;
        font-weight: 500;
        color: var(--khames-design-system-colors-gray-dark);
        font-size: 16px;
        letter-spacing: 0;
        line-height: normal;
    }

    /* RTL: align label to right */
    [dir="rtl"] .create-account .label,
    html[dir="rtl"] .create-account .label {
        justify-content: flex-start;
        text-align: right;
        direction: rtl;
    }

    /* LTR: align label to left */
    [dir="ltr"] .create-account .label,
    html[dir="ltr"] .create-account .label {
        justify-content: flex-start;
        text-align: left;
        direction: ltr;
    }

    /* Duplicate removed - using updated version from lines 157-228 */

    .create-account select.placeholder {
        cursor: pointer;
    }

    .create-account input.placeholder {
        padding: 0;
        cursor: text;
    }

        .create-account input.placeholder:focus {
            outline: none;
        }

    .create-account .div {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        min-height: 0;
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;
        position: relative;
        align-self: stretch;
        width: 100%;
    }

    .create-account .label-2 {
        margin: 0;
        position: relative;
        display: flex;
        align-items: center;
        align-self: stretch;
        z-index: 1;
        font-family: "IBM Plex Sans Arabic", Helvetica;
        font-weight: 500;
        color: var(--khames-design-system-colors-gray-dark);
        font-size: 16px;
        letter-spacing: 0;
        line-height: normal;
    }

    /* RTL: align label-2 to right */
    [dir="rtl"] .create-account .label-2,
    html[dir="rtl"] .create-account .label-2 {
        justify-content: flex-start;
        text-align: right;
        direction: rtl;
    }

    /* LTR: align label-2 to left */
    [dir="ltr"] .create-account .label-2,
    html[dir="ltr"] .create-account .label-2 {
        justify-content: flex-start;
        text-align: left;
        direction: ltr;
    }

    .create-account .p {
        flex: 1;
        min-height: 11px;
        font-weight: 400;
        color: var(--khames-design-system-colors-gray-darkest);
        white-space: nowrap;
        position: relative;
        display: flex;
        align-items: center;
        font-family: "IBM Plex Sans Arabic", Helvetica;
        font-size: 16px;
        letter-spacing: 0;
        line-height: normal;
        background: none;
        border: none;
        outline: none;
        width: 100%;
        padding: 0;
    }

    /* RTL Support for price input */
    [dir="rtl"] .create-account .p,
    html[dir="rtl"] .create-account .p {
        text-align: right;
    }

    [dir="ltr"] .create-account .p,
    html[dir="ltr"] .create-account .p {
        text-align: left;
    }

    .create-account input.p:focus {
        outline: none;
    }

    .create-account .span {
        font-weight: 500;
    }

    .create-account .text-wrapper-2 {
        font-family: "saudi_riyal-Regular", Helvetica;
    }

    .create-account .field-2 {
        background-color: var(--colors-primary-50);
        border: 1px dashed;
        border-color: var(--colors-primary-500);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 16px;
        position: relative;
        align-self: stretch;
        width: 100%;
        flex: 0 0 auto;
        z-index: 0;
        border-radius: 12px;
        overflow: hidden;
        cursor: pointer;
    }

    .create-account .visually-hidden {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border-width: 0;
    }

    .create-account .placeholder-2 {
        width: fit-content;
        font-weight: 500;
        color: var(--colors-primary-500);
        white-space: nowrap;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: "IBM Plex Sans Arabic", Helvetica;
        font-size: 16px;
        letter-spacing: 0;
        line-height: normal;
        cursor: pointer;
    }

    /* RTL/LTR: Keep upload field centered - text and icon together in center */
    [dir="rtl"] .create-account .field-2,
    html[dir="rtl"] .create-account .field-2 {
        flex-direction: row;
        justify-content: center !important;
    }
    
    [dir="ltr"] .create-account .field-2,
    html[dir="ltr"] .create-account .field-2 {
        flex-direction: row;
        justify-content: center !important;
    }
    
    /* Remove any margin that pushes icon to sides - keep centered */
    [dir="rtl"] .create-account .field-2 .img,
    [dir="rtl"] .create-account .field-2 .placeholder-2,
    html[dir="rtl"] .create-account .field-2 .img,
    html[dir="rtl"] .create-account .field-2 .placeholder-2 {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    [dir="ltr"] .create-account .field-2 .img,
    [dir="ltr"] .create-account .field-2 .placeholder-2,
    html[dir="ltr"] .create-account .field-2 .img,
    html[dir="ltr"] .create-account .field-2 .placeholder-2 {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    [dir="ltr"] .create-account .field-2,
    html[dir="ltr"] .create-account .field-2 {
        flex-direction: row;
    }

   

    [dir="ltr"] .create-account .field-2 .placeholder-2,
    html[dir="ltr"] .create-account .field-2 .placeholder-2 {
        order: 1;
    }

    .create-account .button {
        all: unset;
        box-sizing: border-box;
        display: flex;
        min-height: 64px;
        align-items: center;
        justify-content: center;
        padding: 0px 16px;
        position: relative;
        align-self: stretch;
        width: 100%;
        background-color: var(--colors-primary-500);
        border-radius: 16px;
        cursor: pointer;
    }

        .create-account .button:hover {
            opacity: 0.9;
        }

        .create-account .button:active {
            opacity: 0.8;
        }

    .create-account .text-wrapper-3 {
        position: relative;
        width: fit-content;
        font-family: "IBM Plex Sans Arabic", Helvetica;
        font-weight: 700;
        color: var(--khames-design-system-colors-gray-white);
        font-size: 20px;
        letter-spacing: 0;
        line-height: normal;
        white-space: nowrap;
    }

    /* RTL/LTR support for button text */
    [dir="rtl"] .create-account .text-wrapper-3,
    html[dir="rtl"] .create-account .text-wrapper-3 {
        direction: rtl;
    }

    [dir="ltr"] .create-account .text-wrapper-3,
    html[dir="ltr"] .create-account .text-wrapper-3 {
        direction: ltr;
    }

    /* Image Preview Gallery */
    .image-preview-gallery {
        display: none;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 12px;
        width: 100%;
        align-items: flex-start;
        justify-content: flex-start;
    }

    [dir="rtl"] .image-preview-gallery,
    html[dir="rtl"] .image-preview-gallery {
        flex-direction: row-reverse;
        justify-content: flex-start;
    }

    [dir="ltr"] .image-preview-gallery,
    html[dir="ltr"] .image-preview-gallery {
        flex-direction: row;
        justify-content: flex-start;
    }

    .image-preview-item {
        position: relative;
        width: 80px;
        height: 80px;
        flex-shrink: 0;
    }

    .image-preview-wrapper {
        position: relative;
        width: 100%;
        height: 100%;
        border-radius: 8px;
        overflow: hidden;
        background-color: var(--khames-design-system-colors-gray-white, #FFFFFF);
        border: 1px solid var(--khames-design-system-colors-gray-lighter, #E6E6E6);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
        transition: box-shadow 0.2s ease, transform 0.2s ease;
    }

    .image-preview-wrapper:hover {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
        transform: translateY(-1px);
    }

    .image-preview-thumbnail {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .image-preview-delete-btn {
        position: absolute;
        top: 2px;
        right: 2px;
        width: 20px;
        height: 20px;
        background-color: rgba(219, 58, 52, 0.95);
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        padding: 0;
        transition: all 0.2s ease;
        z-index: 10;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    }

    [dir="rtl"] .image-preview-delete-btn,
    html[dir="rtl"] .image-preview-delete-btn {
        right: auto;
        left: 2px;
    }

    .image-preview-delete-btn:hover {
        background-color: rgba(219, 58, 52, 1);
        transform: scale(1.15);
        box-shadow: 0 2px 6px rgba(219, 58, 52, 0.4);
    }

    .image-preview-delete-btn svg {
        width: 12px;
        height: 12px;
        stroke: white;
        transition: stroke 0.2s ease;
    }

    /* Responsive adjustments for image preview */
    @media (max-width: 768px) {
        .image-preview-gallery {
            gap: 8px;
        }

        .image-preview-item {
            width: 70px;
            height: 70px;
        }

        .image-preview-delete-btn {
            width: 20px;
            height: 20px;
            top: 4px;
            right: 4px;
        }

        [dir="rtl"] .image-preview-delete-btn,
        html[dir="rtl"] .image-preview-delete-btn {
            left: 4px;
        }

        .image-preview-delete-btn svg {
            width: 12px;
            height: 12px;
        }
    }

    @media (max-width: 480px) {
        .image-preview-item {
            width: 60px;
            height: 60px;
        }

        .image-preview-gallery {
            gap: 6px;
        }

        .image-preview-delete-btn {
            width: 18px;
            height: 18px;
            top: 3px;
            right: 3px;
        }

        [dir="rtl"] .image-preview-delete-btn,
        html[dir="rtl"] .image-preview-delete-btn {
            left: 3px;
        }

        .image-preview-delete-btn svg {
            width: 10px;
            height: 10px;
        }
    }

/* ===== Modal UX fixes (compact header, typography, field alignment) ===== */

.create-account {
    gap: 16px !important;
    padding: 20px 20px 24px !important;
}

.create-account .service-request-modal-header,
.create-account .logout {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    width: 100%;
    flex-shrink: 0;
    position: relative;
}

.create-account .service-request-modal-header .text-wrapper {
    flex: 1 1 auto;
    min-width: 0;
    order: 1;
}

[dir="rtl"] .create-account .logout {
    flex-direction: row-reverse !important;
    justify-content: flex-start !important;
}

.create-account .icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
    flex-shrink: 0;
}

.create-account .file {
    width: 24px !important;
    height: 24px !important;
}

.create-account h1.text-wrapper,
.create-account h2.text-wrapper {
    flex: 1;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    letter-spacing: normal !important;
    text-align: start !important;
    align-self: center;
}

[dir="ltr"] .create-account h1.text-wrapper,
[dir="ltr"] .create-account h2.text-wrapper,
:lang(en) .create-account h1.text-wrapper,
:lang(en) .create-account h2.text-wrapper {
    text-align: left !important;
}

[dir="rtl"] .create-account h1.text-wrapper,
[dir="rtl"] .create-account h2.text-wrapper,
:lang(ar) .create-account h1.text-wrapper,
:lang(ar) .create-account h2.text-wrapper {
    text-align: right !important;
}

.create-account .service-request-form {
    gap: 0 !important;
}

/* Space between field groups; label sits tight above its own input */
.create-account .svc-request-modal__scroll {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.create-account .service-request-legacy-fields,
.create-account #platform-customer-form-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.create-account .text-field,
.create-account .client-form-field,
.create-account .div {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    height: auto !important;
    min-height: 0 !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    width: 100%;
    margin: 0 !important;
}

.create-account .label,
.create-account .label-2,
.create-account .client-form-label {
    font-size: 13px !important;
    margin: 0 !important;
    padding: 0;
    line-height: 1.35;
}

.create-account .field {
    padding: 10px 12px !important;
    gap: 10px !important;
    cursor: default;
}

.create-account .field .img-arrow {
    position: static !important;
    flex-shrink: 0;
    margin: 0 !important;
}

/* Field layout: LTR = icon left, value, arrow right | RTL = icon right, value, arrow left */
[dir="ltr"] #serviceProviderRequestModal .create-account .field,
html[dir="ltr"] #serviceProviderRequestModal .create-account .field,
:lang(en) #serviceProviderRequestModal .create-account .field,
[dir="ltr"] .create-account .field,
html[dir="ltr"] .create-account .field,
:lang(en) .create-account .field {
    flex-direction: row !important;
    direction: ltr !important;
}

[dir="rtl"] #serviceProviderRequestModal .create-account .field,
html[dir="rtl"] #serviceProviderRequestModal .create-account .field,
:lang(ar) #serviceProviderRequestModal .create-account .field,
[dir="rtl"] .create-account .field,
html[dir="rtl"] .create-account .field,
:lang(ar) .create-account .field {
    flex-direction: row !important;
    direction: rtl !important;
}

[dir="ltr"] .create-account .field > .img:not(.img-arrow),
html[dir="ltr"] .create-account .field > .img:not(.img-arrow),
:lang(en) .create-account .field > .img:not(.img-arrow),
[dir="rtl"] .create-account .field > .img:not(.img-arrow),
html[dir="rtl"] .create-account .field > .img:not(.img-arrow),
:lang(ar) .create-account .field > .img:not(.img-arrow) {
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex-shrink: 0;
}

[dir="ltr"] .create-account .field > select,
[dir="ltr"] .create-account .field > input:not(.p),
html[dir="ltr"] .create-account .field > select,
html[dir="ltr"] .create-account .field > input:not(.p),
:lang(en) .create-account .field > select,
:lang(en) .create-account .field > input:not(.p) {
    flex: 1 !important;
    min-width: 0;
}

[dir="ltr"] #serviceProviderRequestModal .create-account .field > .img-arrow,
html[dir="ltr"] #serviceProviderRequestModal .create-account .field > .img-arrow,
:lang(en) #serviceProviderRequestModal .create-account .field > .img-arrow,
[dir="ltr"] .create-account .field > .img-arrow,
html[dir="ltr"] .create-account .field > .img-arrow,
:lang(en) .create-account .field > .img-arrow {
    margin-left: auto !important;
    margin-right: 0 !important;
}

[dir="rtl"] .create-account .field > select,
[dir="rtl"] .create-account .field > input:not(.p),
html[dir="rtl"] .create-account .field > select,
html[dir="rtl"] .create-account .field > input:not(.p),
:lang(ar) .create-account .field > select,
:lang(ar) .create-account .field > input:not(.p) {
    flex: 1 !important;
    min-width: 0;
}

[dir="ltr"] .create-account .field input,
[dir="ltr"] .create-account .field select,
[dir="ltr"] .create-account .field .placeholder,
[dir="ltr"] .create-account .field .p,
html[dir="ltr"] .create-account .field input,
html[dir="ltr"] .create-account .field select,
html[dir="ltr"] .create-account .field .placeholder,
html[dir="ltr"] .create-account .field .p,
:lang(en) .create-account .field input,
:lang(en) .create-account .field select,
:lang(en) .create-account .field .placeholder,
:lang(en) .create-account .field .p,
:lang(en) .create-account .field .client-custom-select__trigger,
:lang(en) .create-account .field .client-custom-select__label {
    direction: ltr !important;
    text-align: left !important;
}

[dir="rtl"] .create-account .field input,
[dir="rtl"] .create-account .field select,
[dir="rtl"] .create-account .field .placeholder,
[dir="rtl"] .create-account .field .p,
html[dir="rtl"] .create-account .field input,
html[dir="rtl"] .create-account .field select,
html[dir="rtl"] .create-account .field .placeholder,
html[dir="rtl"] .create-account .field .p,
:lang(ar) .create-account .field input,
:lang(ar) .create-account .field select,
:lang(ar) .create-account .field .placeholder,
:lang(ar) .create-account .field .p,
:lang(ar) .create-account .field .client-custom-select__trigger,
:lang(ar) .create-account .field .client-custom-select__label {
    direction: rtl !important;
    text-align: right !important;
}

.create-account .field .img-currency {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--khames-design-system-colors-gray-dark, #666666);
    pointer-events: none;
}

.create-account .button {
    min-height: 48px !important;
    border-radius: 12px !important;
}

.create-account .text-wrapper-3 {
    font-size: 16px !important;
}

:lang(en) .create-account .field input,
:lang(en) .create-account .field select,
:lang(en) .create-account .field .placeholder,
:lang(en) .create-account .field .p {
    direction: ltr !important;
    text-align: left !important;
}

:lang(ar) .create-account .field input,
:lang(ar) .create-account .field select,
:lang(ar) .create-account .field .placeholder,
:lang(ar) .create-account .field .p {
    direction: rtl !important;
    text-align: right !important;
}

/* Modal header: title + close — LTR close right, RTL close left (also when lang/dir mismatch) */
.create-account .service-request-modal-header .cancel {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    order: 2;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 6px;
    margin: 0;
    color: var(--khames-design-system-colors-gray-darkest);
}

/* English / LTR: title left, close right */
:lang(en) .create-account .service-request-modal-header,
[dir="ltr"] .create-account .service-request-modal-header,
html[dir="ltr"] .create-account .service-request-modal-header {
    flex-direction: row !important;
    direction: ltr !important;
}

:lang(en) .create-account .service-request-modal-header .cancel,
[dir="ltr"] .create-account .service-request-modal-header .cancel,
html[dir="ltr"] .create-account .service-request-modal-header .cancel {
    margin-left: auto !important;
    margin-right: 0 !important;
    margin-inline-start: auto !important;
    margin-inline-end: 0 !important;
}

/* Arabic / RTL: title right, close left */
:lang(ar) .create-account .service-request-modal-header,
[dir="rtl"] .create-account .service-request-modal-header,
html[dir="rtl"] .create-account .service-request-modal-header {
    flex-direction: row !important;
    direction: rtl !important;
}

:lang(ar) .create-account .service-request-modal-header .cancel,
[dir="rtl"] .create-account .service-request-modal-header .cancel,
html[dir="rtl"] .create-account .service-request-modal-header .cancel {
    margin-left: 0 !important;
    margin-right: auto !important;
    margin-inline-start: auto !important;
    margin-inline-end: 0 !important;
}

.create-account .service-request-modal-header .cancel svg {
    width: 24px;
    height: 24px;
    display: block;
}

.create-account .service-request-modal-header .cancel img {
    display: none;
}

/* ===== Services index — dimmed backdrop (no blur — keeps modal sharp) ===== */

/* Optional extra layer (modal .show background is the primary dim) */
.svc-request-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100001;
    background: rgba(17, 24, 39, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.svc-request-modal-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
    /* Visual dim only — modal (z-index 100002) handles interaction */
    pointer-events: none;
}

body.svc-create-request-open .modal-backdrop {
    display: none !important;
}

/* Block scroll on the page behind the modal */
html.svc-create-request-open,
body.svc-create-request-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

body.svc-create-request-open #client-services-page,
body.svc-create-request-open #mainHeader,
body.svc-create-request-open .services-frame {
    pointer-events: none !important;
    user-select: none;
}

#serviceProviderRequestModal.svc-request-modal {
    z-index: 100002 !important;
}

#serviceProviderRequestModal.svc-request-modal .modal-content,
#serviceProviderRequestModal.svc-request-modal .modal-dialog {
    filter: none !important;
}

#serviceProviderRequestModal.svc-request-modal .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(55, 42, 88, 0.28), 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

#serviceProviderRequestModal.svc-request-modal .svc-request-modal__body {
    padding: 0;
}

#serviceProviderRequestModal .svc-request-modal-shell.create-account {
    padding: 0 !important;
    gap: 0 !important;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(90vh, calc(100vh - 3.5rem));
    overflow: hidden;
}

#serviceProviderRequestModal .svc-request-modal-header {
    flex-shrink: 0;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 16px !important;
    padding: 20px 24px 16px !important;
    margin: 0 !important;
    background: #fff;
    border-bottom: 1px solid #ece8f2;
    width: 100%;
    box-sizing: border-box;
    font-family: "IBM Plex Sans Arabic", Helvetica, sans-serif;
}

#serviceProviderRequestModal .svc-request-modal-header__intro {
    flex: 1 1 auto;
    min-width: 0;
    order: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#serviceProviderRequestModal .svc-request-modal-header__title {
    margin: 0 !important;
    padding: 0 !important;
    font-family: "IBM Plex Sans Arabic", Helvetica, sans-serif !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-align: start !important;
    color: var(--colors-primary-600, #372a58) !important;
}

#serviceProviderRequestModal .svc-request-modal-header__subtitle {
    margin: 0;
    padding: 0;
    font-family: "IBM Plex Sans Arabic", Helvetica, sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.45;
    color: var(--colors-primary-500, #6a5d8b);
    text-align: start;
}

#serviceProviderRequestModal .svc-request-modal-header__subtitle[hidden] {
    display: none !important;
}

[dir="ltr"] #serviceProviderRequestModal .svc-request-modal-header__title,
[dir="ltr"] #serviceProviderRequestModal .svc-request-modal-header__subtitle,
html[dir="ltr"] #serviceProviderRequestModal .svc-request-modal-header__title,
html[dir="ltr"] #serviceProviderRequestModal .svc-request-modal-header__subtitle,
:lang(en) #serviceProviderRequestModal .svc-request-modal-header__title,
:lang(en) #serviceProviderRequestModal .svc-request-modal-header__subtitle {
    text-align: left;
}

[dir="rtl"] #serviceProviderRequestModal .svc-request-modal-header__title,
[dir="rtl"] #serviceProviderRequestModal .svc-request-modal-header__subtitle,
html[dir="rtl"] #serviceProviderRequestModal .svc-request-modal-header__title,
html[dir="rtl"] #serviceProviderRequestModal .svc-request-modal-header__subtitle,
:lang(ar) #serviceProviderRequestModal .svc-request-modal-header__title,
:lang(ar) #serviceProviderRequestModal .svc-request-modal-header__subtitle {
    text-align: right;
}

#serviceProviderRequestModal .svc-request-modal-header__close {
    order: 2;
    width: 40px !important;
    height: 40px !important;
    padding: 8px !important;
    border-radius: 12px !important;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#serviceProviderRequestModal .svc-request-modal-header__close:hover {
    background: #f9fafb;
    color: #111827;
    border-color: #d1d5db;
}

#serviceProviderRequestModal .service-request-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 0 !important;
    margin: 0;
    background: #fff;
}

#serviceProviderRequestModal .svc-request-modal__scroll {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px 24px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

#serviceProviderRequestModal .service-request-legacy-fields,
#serviceProviderRequestModal #platform-customer-form-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

#serviceProviderRequestModal .svc-request-modal__footer {
    flex-shrink: 0;
    padding: 16px 24px 20px;
    margin: 0;
    border-top: 1px solid rgba(106, 93, 139, 0.12);
    background: #fff;
}

#serviceProviderRequestModal .svc-request-modal__footer .button {
    width: 100%;
    margin-top: 0 !important;
    pointer-events: auto;
    cursor: pointer;
}

#serviceProviderRequestModal .service-request-form .label,
#serviceProviderRequestModal .service-request-form .label-2 {
    font-weight: 500;
    color: #374151;
}

#serviceProviderRequestModal .create-account .field,
#serviceProviderRequestModal .create-account .field-2 {
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
    background: #fafafa;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    pointer-events: auto;
}

#serviceProviderRequestModal .create-account .field:has(textarea) {
    align-items: stretch;
}

#serviceProviderRequestModal .create-account .field input,
#serviceProviderRequestModal .create-account .field textarea,
#serviceProviderRequestModal .create-account .field select,
#serviceProviderRequestModal .create-account .field .client-form-input {
    pointer-events: auto;
    position: relative;
    z-index: 1;
    cursor: text;
}

#serviceProviderRequestModal .create-account .field select,
#serviceProviderRequestModal .create-account .field .client-custom-select__trigger {
    cursor: pointer;
}

#serviceProviderRequestModal .create-account .field textarea.client-form-input {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    line-height: 1.45;
    border: none;
    outline: none;
    background: transparent;
}

#serviceProviderRequestModal .create-account .field:focus-within,
#serviceProviderRequestModal .create-account .field-2:focus-within {
    border-color: rgba(106, 93, 139, 0.45) !important;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(106, 93, 139, 0.12);
}

#serviceProviderRequestModal .create-account .field-2 {
    cursor: pointer;
}

#serviceProviderRequestModal .create-account .field-2:hover {
    border-color: rgba(106, 93, 139, 0.35) !important;
    background: #fff;
}

#serviceProviderRequestModal .create-account .button {
    min-height: 52px !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 22px rgba(55, 42, 88, 0.24);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#serviceProviderRequestModal .create-account .button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(55, 42, 88, 0.3);
}

#serviceProviderRequestModal .create-account .button:disabled {
    opacity: 0.72;
    box-shadow: none;
}

#serviceProviderRequestModal .service-request-form-alert {
    border-radius: 10px;
}

/* Field values: normal weight (global typography sets button { font-weight: 700 }) */
#serviceProviderRequestModal .create-account .client-custom-select__trigger,
#serviceProviderRequestModal .create-account .client-custom-select__label,
#serviceProviderRequestModal .create-account .field input.placeholder,
#serviceProviderRequestModal .create-account .field select.placeholder,
#serviceProviderRequestModal .create-account .field input.p,
#serviceProviderRequestModal .create-account .field .p,
#serviceProviderRequestModal .create-account .client-form-field .client-form-input,
#serviceProviderRequestModal .create-account .client-form-field .client-form-select {
    font-weight: 400 !important;
}

#serviceProviderRequestModal .create-account .client-custom-select__label--placeholder {
    font-weight: 400 !important;
    color: var(--khames-design-system-colors-gray-dark, #6b7280);
}

/* Keep submit CTA bold */
#serviceProviderRequestModal .create-account .svc-request-modal__footer .button,
#serviceProviderRequestModal .create-account .svc-request-modal__footer .text-wrapper-3 {
    font-weight: 700 !important;
}

/* ===== Create request modal — mobile / narrow viewports ===== */
@media (max-width: 768px) {
    #serviceProviderRequestModal .modal-dialog {
        max-width: calc(100vw - 16px);
        width: calc(100vw - 16px);
        margin: 0.5rem auto;
    }

    #serviceProviderRequestModal .svc-request-modal-header {
        padding: 16px 16px 12px !important;
        gap: 12px !important;
    }

    #serviceProviderRequestModal .svc-request-modal__scroll {
        padding: 16px;
    }

    #serviceProviderRequestModal .svc-request-modal__footer {
        padding: 12px 16px 16px;
    }

    #serviceProviderRequestModal .create-account .text-field,
    #serviceProviderRequestModal .create-account .client-form-field,
    #serviceProviderRequestModal .create-account .div,
    #serviceProviderRequestModal .create-account .service-request-field {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        gap: 4px !important;
    }

    #serviceProviderRequestModal .create-account .label,
    #serviceProviderRequestModal .create-account .label-2,
    #serviceProviderRequestModal .create-account .client-form-label {
        width: 100% !important;
        max-width: 100% !important;
        align-self: stretch !important;
        text-align: start !important;
        justify-content: flex-start !important;
        white-space: normal;
    }

    [dir="ltr"] #serviceProviderRequestModal .create-account .label,
    [dir="ltr"] #serviceProviderRequestModal .create-account .label-2,
    html[dir="ltr"] #serviceProviderRequestModal .create-account .label,
    html[dir="ltr"] #serviceProviderRequestModal .create-account .label-2,
    :lang(en) #serviceProviderRequestModal .create-account .label,
    :lang(en) #serviceProviderRequestModal .create-account .label-2 {
        text-align: start !important;
    }

    [dir="rtl"] #serviceProviderRequestModal .create-account .label,
    [dir="rtl"] #serviceProviderRequestModal .create-account .label-2,
    html[dir="rtl"] #serviceProviderRequestModal .create-account .label,
    html[dir="rtl"] #serviceProviderRequestModal .create-account .label-2,
    :lang(ar) #serviceProviderRequestModal .create-account .label,
    :lang(ar) #serviceProviderRequestModal .create-account .label-2 {
        text-align: start !important;
    }

    #serviceProviderRequestModal .create-account .field,
    #serviceProviderRequestModal .create-account .field-2 {
        width: 100% !important;
        max-width: 100% !important;
        align-self: stretch !important;
        flex: 0 0 auto !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    #serviceProviderRequestModal .create-account .field > select,
    #serviceProviderRequestModal .create-account .field > input,
    #serviceProviderRequestModal .create-account .field > .placeholder,
    #serviceProviderRequestModal .create-account .field .client-custom-select__trigger,
    #serviceProviderRequestModal .create-account .field .client-form-input,
    #serviceProviderRequestModal .create-account .field .client-form-select {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    #serviceProviderRequestModal .create-account .field .client-custom-select__label {
        max-width: 100%;
    }

    #serviceProviderRequestModal .create-account .field-2 {
        justify-content: center !important;
    }

    #serviceProviderRequestModal .create-account .placeholder-2 {
        white-space: normal;
        text-align: center;
    }

    #serviceProviderRequestModal .create-account .button {
        min-height: 48px !important;
    }
}

@media (max-width: 480px) {
    #serviceProviderRequestModal .modal-dialog {
        max-width: calc(100vw - 12px);
        width: calc(100vw - 12px);
        margin: 0.375rem auto;
    }

    #serviceProviderRequestModal .svc-request-modal-header__title {
        font-size: 1.125rem !important;
    }

    #serviceProviderRequestModal .svc-request-modal__scroll {
        padding: 12px;
    }

    #serviceProviderRequestModal .svc-request-modal__footer {
        padding: 10px 12px 14px;
    }

    #serviceProviderRequestModal .create-account .field {
        padding: 8px 10px !important;
        gap: 8px !important;
    }
}
