/* ==========================================================
   Pelak Azad — Single Car Seller Phone Popup
========================================================== */

.pa-seller-phone-modal[hidden] {
    display: none !important;
}

.pa-seller-phone-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    direction: rtl;
    font-family: "VazirMatn", "Vazir", Tahoma, Arial, sans-serif;
}

.pa-seller-phone-modal__backdrop,
.pa-seller-phone-modal__dialog {
    transition: opacity .26s ease, transform .26s ease;
}

.pa-seller-phone-modal__backdrop {
    opacity: 0;
}

.pa-seller-phone-modal__dialog {
    opacity: 0;
    transform: translateY(12px) scale(.98);
}

.pa-seller-phone-modal.is-visible .pa-seller-phone-modal__backdrop {
    opacity: 1;
}

.pa-seller-phone-modal.is-visible .pa-seller-phone-modal__dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.pa-seller-phone-modal__backdrop {
    position: absolute;
    inset: 0;

    background: rgba(15, 23, 42, .52);
    backdrop-filter: blur(4px);
}

.pa-seller-phone-modal__dialog {
    position: relative;
    z-index: 2;

    width: min(100%, 460px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;

    padding: 22px;

    background: #ffffff;
    border: 1px solid #e7ebf0;
    border-radius: 20px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .22);
}

.pa-seller-phone-modal__close,
.pa-seller-phone-modal__close:hover,
.pa-seller-phone-modal__close:focus {
    position: absolute;
    top: 14px;
    left: 14px;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;

    margin: 0 !important;
    padding: 0 !important;

    background: #f6f7f9 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 999px !important;
    box-shadow: none !important;

    color: #374151 !important;
    font-size: 24px !important;
    font-weight: 400 !important;
    line-height: 1 !important;

    cursor: pointer;
}

.pa-seller-phone-modal__close:hover {
    background: #fef2f2 !important;
    border-color: rgba(237, 28, 36, .16) !important;
    color: #ed1c24 !important;
}

.pa-seller-phone-modal__header {
    display: flex;
    align-items: center;
    gap: 11px;

    padding-left: 42px;
    margin-bottom: 18px;
}

.pa-seller-phone-modal__header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    flex: 0 0 42px;

    background: rgba(237, 28, 36, .08);
    border-radius: 12px;

    color: #ed1c24;
}

.pa-seller-phone-modal__header-icon svg,
.pa-seller-phone-modal__section-icon svg {
    width: 22px;
    height: 22px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pa-seller-phone-modal__header h3 {
    margin: 0 0 3px;

    color: #111827;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.6;
}

.pa-seller-phone-modal__header p {
    margin: 0;

    color: #8a919b;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.7;
}

.pa-seller-phone-modal__sections {
    display: grid;
    gap: 10px;
}

.pa-seller-phone-modal__section {
    box-sizing: border-box;

    border-radius: 14px;
}

.pa-seller-phone-modal__section--phone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 112px;
    padding: 16px;

    background: #f8f9fb;
    border: 1px solid #e9edf2;

    text-align: center;
}

.pa-seller-phone-modal__label {
    margin-bottom: 5px;

    color: #7a8089;
    font-size: 11px;
    font-weight: 500;
}

.pa-seller-phone-modal__number {
    display: inline-block;

    color: #111827 !important;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: .5px;
    text-decoration: none !important;
}

a.pa-seller-phone-modal__number:hover {
    color: #ed1c24 !important;
}

.pa-seller-phone-modal__phone-hint {
    margin-top: 3px;

    color: #9ca3af;
    font-size: 10px;
    line-height: 1.6;
}

.pa-seller-phone-modal__login {
    color: #b91c24;
    font-size: 12px;
    text-decoration: underline;
}

.pa-seller-phone-modal__unavailable {
    color: #6b7280;
    font-size: 14px;
}

.pa-seller-phone-modal__section--warning,
.pa-seller-phone-modal__section--source {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    padding: 13px 14px;
}

.pa-seller-phone-modal__section--warning {
    background: #fffaf0;
    border: 1px solid #fde7b2;
}

.pa-seller-phone-modal__section--source {
    background: #f6f8fb;
    border: 1px solid #e5eaf0;
}

.pa-seller-phone-modal__section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;
    flex: 0 0 30px;

    border-radius: 9px;
}

.pa-seller-phone-modal__section--warning .pa-seller-phone-modal__section-icon {
    background: #fff1cc;
    color: #b7791f;
}

.pa-seller-phone-modal__section--source .pa-seller-phone-modal__section-icon {
    background: rgba(237, 28, 36, .07);
    color: #ed1c24;
}

.pa-seller-phone-modal__section strong {
    display: block;
    margin-bottom: 3px;

    color: #1f2937;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.7;
}

.pa-seller-phone-modal__section p {
    margin: 0;

    color: #626b77;
    font-size: 10.5px;
    font-weight: 400;
    line-height: 1.9;
}

html.pa-seller-phone-modal-open,
body.pa-seller-phone-modal-open {
    overflow: hidden !important;
}

@media (max-width: 767px) {
    .pa-seller-phone-modal {
        align-items: flex-end;
        justify-content: stretch;

        padding: 0 !important;
    }

    .pa-seller-phone-modal__dialog {
        width: 100% !important;
        max-width: none !important;
        max-height: 85dvh;

        margin: 0 !important;
        padding: 28px 16px calc(16px + env(safe-area-inset-bottom));

        background: #ffffff;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -20px 55px rgba(15, 23, 42, .24);

        opacity: 1;
        transform: translate3d(0, calc(100% + 18px), 0);

        transition:
            transform .38s cubic-bezier(.22, 1, .36, 1),
            opacity .20s ease !important;

        will-change: transform;
        outline: 0 !important;
    }

    .pa-seller-phone-modal__backdrop {
        transition: opacity .28s ease !important;
    }

    .pa-seller-phone-modal.is-visible .pa-seller-phone-modal__dialog {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }

    .pa-seller-phone-modal__dialog::before {
        content: "";

        position: absolute;
        top: 9px;
        left: 50%;

        width: 44px;
        height: 5px;

        background: #d5dae1;
        border-radius: 999px;

        transform: translateX(-50%);
    }

    .pa-seller-phone-modal__close,
    .pa-seller-phone-modal__close:hover,
    .pa-seller-phone-modal__close:focus,
    .pa-seller-phone-modal__close:focus-visible {
        top: 12px;
        left: 12px;
        width: 32px !important;
        min-width: 32px !important;
        max-width: 32px !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        font-size: 22px !important;

        outline: 0 !important;
        box-shadow: none !important;
        -webkit-tap-highlight-color: transparent;
    }

    .pa-seller-phone-modal__close:focus,
    .pa-seller-phone-modal__close:focus-visible {
        outline: 0 !important;
        box-shadow: none !important;
    }

    .pa-seller-phone-modal__header {
        margin-bottom: 14px;
        padding-left: 38px;
    }

    .pa-seller-phone-modal__header-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 11px;
    }

    .pa-seller-phone-modal__header h3 {
        font-size: 16px;
    }

    .pa-seller-phone-modal__section--phone {
        min-height: 96px;
        padding: 13px;
    }

    .pa-seller-phone-modal__number {
        font-size: 22px;
    }

    .pa-seller-phone-modal__section--warning,
    .pa-seller-phone-modal__section--source {
        padding: 11px 12px;
    }
}

/* Keep the native Digits controls within the contact card. */
.pa-seller-phone-modal__auth {
    width: 100%;
    min-width: 0;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    text-align: start;
}

.pa-seller-phone-modal__auth .pa-seller-phone-modal__auth-note {
    margin: 0 0 10px;
    font-size: 12px;
}

.pa-seller-phone-modal__auth .digits-form_container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
}

.pa-seller-phone-modal__auth .digits-form_wrapper,
.pa-seller-phone-modal__auth .digits-form_heading {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.pa-seller-phone-modal__auth .digits-form_heading {
    font-size: 16px;
}

.pa-seller-phone-modal__auth .digits-form_button,
.pa-seller-phone-modal__auth input {
    font-family: inherit;
}

.pa-seller-phone-modal__auth .digits-form_submit-btn {
    --dbutton_bg: #ed1c24;
    --dbutton_text: #fff;
    margin-top: 10px;
}

.pa-seller-phone-modal__call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: 8px;
    padding: 0 22px;
    border-radius: 10px;
    background: #ed1c24;
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
}

/* Keep Digits' native steps inside the seller-contact card. */
.pa-seller-phone-modal__auth .digits-form_heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 32px;
    margin: 0 0 8px;
}

.pa-seller-phone-modal__auth .digits-form_tab-bar:has(> .digits-form_tab-item):not(:has(> .digits-form_tab-item ~ .digits-form_tab-item)) {
    display: none !important;
}

.pa-seller-phone-modal__auth .digits_form_back:not(.digits_hide_back) {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    order: 1;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin: 0 !important;
    background-position: center;
}

.pa-seller-phone-modal__auth .digits-form_input_row.digits-mobile_wrapper {
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.pa-seller-phone-modal__auth .digits-mobile_wrapper input[name="digits_phone"]:focus {
    box-shadow: none !important;
    outline: none !important;
    border-color: var(--daccent, #ed1c24) !important;
}

.pa-seller-phone-modal__auth .pa-login-otp-row,
.pa-seller-phone-modal__auth .pa-login-otp-host {
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.pa-seller-phone-modal__auth .pa-login-otp-split__boxes {
    grid-template-columns: repeat(var(--pa-otp-length), minmax(0, 54px));
    gap: clamp(4px, 2vw, 10px);
}

.pa-seller-phone-modal__auth .digits_otp_info {
    display: none !important;
}
