/*
 * Pelak Azad — Digits OTP split-box presentation
 * v1.1.72.745
 * Guest /login/ only. The original Digits input stays functional.
 */

.pa-login-otp-split {
    --pa-otp-length: 5;
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-height: 62px !important;
    margin: 0 !important;
    direction: ltr !important;
    isolation: isolate;
    box-sizing: border-box !important;
}

.pa-login-otp-split .pa-login-otp-source {
    position: absolute !important;
    inset: 0 !important;
    z-index: 3 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 62px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: transparent !important;
    caret-color: transparent !important;
    box-shadow: none !important;
    opacity: 0.02 !important;
    cursor: text !important;
    direction: ltr !important;
    -webkit-text-fill-color: transparent !important;
    -webkit-tap-highlight-color: transparent !important;
}

.pa-login-otp-split__boxes {
    position: relative;
    z-index: 1;
    display: grid !important;
    grid-template-columns: repeat(var(--pa-otp-length), minmax(44px, 56px));
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 62px;
    pointer-events: none;
    direction: ltr;
    box-sizing: border-box;
}

.pa-login-otp-split__box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 58px;
    border: 1.5px solid #d8dee8;
    border-radius: 12px;
    background: #fff;
    color: #1f2937;
    font-family: "VazirMatn", Tahoma, sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
    box-sizing: border-box;
}

.pa-login-otp-split.is-focused .pa-login-otp-split__box.is-current,
.pa-login-otp-split__box.has-value {
    border-color: #ed1c24;
}

.pa-login-otp-split.is-focused .pa-login-otp-split__box.is-current {
    box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.10);
}

.pa-login-otp-split.is-complete .pa-login-otp-split__box {
    background: #fffafa;
}

.pa-login-otp-split.is-invalid .pa-login-otp-split__box,
.pa-login-otp-split:has(.pa-login-otp-invalid) .pa-login-otp-split__box {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.07);
}

@media (max-width: 480px) {
    .pa-login-otp-split {
        min-height: 58px !important;
    }

    .pa-login-otp-split__boxes {
        grid-template-columns: repeat(var(--pa-otp-length), minmax(42px, 1fr));
        gap: 8px;
        min-height: 58px;
    }

    .pa-login-otp-split__box {
        height: 54px;
        border-radius: 11px;
        font-size: 21px;
    }
}

.pa-login-otp-info-hidden {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* The Digits info glyph can be generated by the OTP input host itself. */
.pa-login-otp-row .pa-login-otp-host::before,
.pa-login-otp-row .pa-login-otp-host::after {
    content: none !important;
    display: none !important;
}

/* Digits may keep an absolutely positioned parent above the first OTP box.
   Remove the complete info component, not only its icon and description. */
[class*="digits_otp_info"],
.digits_otp_info,
.digits_otp_info_wrap,
.digits_otp_info_wrapper,
.digits_otp_info_ic,
.pa-login-otp-row .digits_otp_info_ic,
.pa-login-otp-host .digits_otp_info_ic,
.pa-login-otp-split .digits_otp_info_ic {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Remove the original Digits OTP description container as well. Its icon can
   be hidden while the description box still keeps space in the layout. */
.digits_otp_info_desc {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

.pa-login-otp-inline-notice {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    max-height: 96px;
    margin: 0 0 12px !important;
    padding: 10px 12px !important;
    border: 1px solid rgba(237, 28, 36, 0.16);
    border-radius: 10px;
    background: rgba(237, 28, 36, 0.05);
    color: #5f6b7a;
    font-family: "VazirMatn", Tahoma, sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.8;
    text-align: right;
    direction: rtl;
    opacity: 1;
    overflow: hidden;
    box-sizing: border-box;
    transition: opacity 280ms ease, max-height 320ms ease, margin 320ms ease, padding 320ms ease, border-width 320ms ease;
}

.pa-login-otp-inline-notice.is-hiding {
    max-height: 0;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-top-width: 0;
    border-bottom-width: 0;
    opacity: 0;
}

/* Digits now renders the login headings with its own classes instead of h1/h2. */
:is(.pelak-digits-login, [id="digits_protected"] .digits-form_page) .digits-form_heading {
    margin: 0 0 6px !important;
    text-align: right;
}

:is(.pelak-digits-login, [id="digits_protected"] .digits-form_page) .digits-form_heading .digits-form_heading_text {
    color: #1b2230 !important;
    font-family: "VazirMatn", Tahoma, sans-serif !important;
    font-size: 38px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
}

:is(.pelak-digits-login, [id="digits_protected"] .digits-form_page) .digits-form_tab-bar .digits-slider_line {
    display: none !important;
}

:is(.pelak-digits-login, [id="digits_protected"] .digits-form_page) .digits-form_tab_container:has(.digits_otp_input-field, .pa-login-otp-split) .digits-form_tab-item {
    color: #ed1c24 !important;
    font-family: "VazirMatn", Tahoma, sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.8 !important;
    text-decoration: none !important;
}

@media (max-width: 767px) {
    :is(.pelak-digits-login, [id="digits_protected"] .digits-form_page) .digits-form_heading .digits-form_heading_text {
        font-size: 30px !important;
    }
}
