.mofa-template-zarinpal {
    background: var(--mofa-bg, #ffffff);
    color: var(--mofa-text);
}

.mofa-template-zarinpal::before,
.mofa-template-zarinpal::after {
    display: none;
}

.mofa-template-zarinpal .mofa-zp-nav {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
}

.mofa-template-zarinpal .mofa-zp-nav-toggle {
    border: 1px solid var(--mofa-border);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    color: var(--mofa-secondary-button-text);
    background: var(--mofa-secondary-button-bg);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    font-size: 24px;
}

.mofa-template-zarinpal svg {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px;
    min-height: 24px;
    display: block;
    flex-shrink: 0;
}

.mofa-template-zarinpal .mofa-zp-submit,
.mofa-template-zarinpal .mofa-zp-nav-toggle,
.mofa-template-zarinpal .mofa-zp-back {
    line-height: 0;
}

.mofa-template-zarinpal .mofa-otp-switch {
    justify-content: center;
}

.mofa-template-zarinpal .mofa-zp-nav-toggle:focus {
    box-shadow: 0 0 0 2px #66a6ff;
}

.mofa-template-zarinpal .mofa-zp-menu {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--mofa-text);
    background: var(--mofa-card-bg, #ffffff);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    width: 200px;
    padding: 8px;
    border: 1px solid var(--mofa-border);
    border-radius: 4px;
    position: absolute;
    top: 42px;
    right: 0;
}

.mofa-template-zarinpal .mofa-zp-menu.is-open {
    display: flex;
}

.mofa-template-zarinpal .mofa-zp-menu a {
    color: var(--mofa-text);
    background: var(--mofa-card-bg, #ffffff);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
}

.mofa-template-zarinpal .mofa-zp-menu a:focus,
.mofa-template-zarinpal .mofa-zp-menu a:hover {
    box-shadow: 0 0 0 2px #66a6ff;
    background: color-mix(in srgb, var(--mofa-card-bg, #ffffff) 88%, var(--mofa-border) 12%);
}

.mofa-template-zarinpal .mofa-zp-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.mofa-template-zarinpal .mofa-zp-card {
    width: min(100%, 450px);
    text-align: center;
    position: relative;
}

.mofa-template-zarinpal .mofa-zp-back {
    position: absolute;
    top: 0;
    right: 0;
    border: 1px solid var(--mofa-border);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    color: var(--mofa-secondary-button-text);
    background: var(--mofa-secondary-button-bg);
    font-size: 24px;
}


.mofa-template-zarinpal .mofa-zp-back:focus {
    box-shadow: 0 0 0 2px #66a6ff;
}

.mofa-template-zarinpal .mofa-zp-logo img {
    max-width: 160px;
    height: auto;
}

.mofa-template-zarinpal .mofa-zp-head {
    text-align: center;
    margin-bottom: 12px;
}

.mofa-template-zarinpal .mofa-zp-title {
    line-height: 40px;
    font-weight: 800;
    font-size: 28px;
    margin: 12px 0 0;
    color: var(--mofa-text);
}

.mofa-template-zarinpal .mofa-zp-desc,
.mofa-template-zarinpal .mofa-sms-login__desc {
    color: var(--mofa-muted);
    margin: 12px 0 32px;
    line-height: 28px;
    font-size: 14px;
    font-weight: 400;
}

.mofa-template-zarinpal .mofa-zp-otp-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 34px;
}

.mofa-template-zarinpal .mofa-zp-otp-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--mofa-text);
    margin: 8px 0 14px;
    line-height: 1.25;
}

.mofa-template-zarinpal .mofa-zp-otp-desc {
    color: var(--mofa-muted);
    font-size: 14px;
    line-height: 2;
    margin: 0;
}

.mofa-template-zarinpal .mofa-zp-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.mofa-template-zarinpal .mofa-zp-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.mofa-template-zarinpal .mofa-otp-only {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mofa-template-zarinpal .mofa-zp-otp-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 680px;
    margin: 0 auto;
    gap: 20px;
    font-size: 14px;
    color: var(--mofa-muted);
    flex-wrap: nowrap;
}

.mofa-template-zarinpal .mofa-otp-field {
    --mofa-otp-box-size: 44px;
    --mofa-otp-gap: 6px;
}

.mofa-template-zarinpal .mofa-zp-divider {
    flex: 0 0 1px;
    align-self: stretch;
    background: #e0e0e6;
}

.mofa-template-zarinpal .mofa-zp-link {
    color: var(--mofa-action-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
}

.mofa-template-zarinpal .mofa-zp-link:hover,
.mofa-template-zarinpal .mofa-sms-login__action a:hover,
.mofa-template-zarinpal .mofa-zp-timer .mofa-sms-login__timer-resend:hover {
    color: var(--mofa-action-hover-color);
}

.mofa-template-zarinpal .mofa-zp-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.mofa-template-zarinpal .mofa-zp-timer .mofa-sms-login__timer-countdown {
    display: block;
}

.mofa-template-zarinpal .mofa-zp-timer .mofa-sms-login__timer-resend {
    color: var(--mofa-action-color);
    font-weight: 600;
}

.mofa-template-zarinpal .mofa-zp-input {
    color: var(--mofa-text);
    background-color: var(--mofa-input-bg);
    width: 100%;
    outline: none;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid var(--mofa-border);
    border-radius: 4px;
    height: 48px;
}

.mofa-template-zarinpal .mofa-zp-input:focus {
    box-shadow: 0 0 0 2px rgba(102, 166, 255, 0.4);
    border-color: #66a6ff;
}

.mofa-template-zarinpal .mofa-invalid {
    border-color: #f04438;
    box-shadow: 0 0 0 2px rgba(240, 68, 56, 0.2);
}

.mofa-template-zarinpal .mofa-otp-input {
    border-radius: 0 !important;
}

.mofa-template-zarinpal .mofa-otp-field {
    --mofa-otp-box-size: 44px;
    --mofa-otp-gap: 6px;
    max-width: 680px;
    margin: 0 auto;
}

.mofa-template-zarinpal .mofa-otp-box {
    border-radius: 8px;
    border-color: var(--mofa-border);
    font-size: 16px;
    font-weight: 700;
    color: var(--mofa-text);
}

.mofa-template-zarinpal .mofa-otp-box.is-active,
.mofa-template-zarinpal .mofa-otp-field.is-focused .mofa-otp-box.is-active {
    border-color: #66a6ff;
    box-shadow: 0 0 0 4px rgba(102, 166, 255, 0.18);
}

.mofa-template-zarinpal #mofa-form-otp .mofa-zp-row,
.mofa-template-zarinpal #mofa-form-otp-reset .mofa-zp-row {
    display: block;
}

.mofa-template-zarinpal #mofa-form-otp .mofa-zp-submit,
.mofa-template-zarinpal #mofa-form-otp-reset .mofa-zp-submit {
    display: none;
}

.mofa-template-zarinpal .mofa-zp-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mofa-template-zarinpal .mofa-zp-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mofa-template-zarinpal .mofa-register-only.is-visible {
    display: flex;
}

.mofa-template-zarinpal .mofa-password-only.is-visible {
    display: block;
}

.mofa-template-zarinpal .mofa-zp-submit,
.mofa-template-zarinpal .mofa-zp-submit-wide {
    background-color: var(--mofa-button-color);
    color: #fff;
    border-radius: 4px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    height: 48px;
    font-size: 24px;
}

.mofa-template-zarinpal .mofa-login-actions {
    justify-content: center;
    margin-top: 4px;
}

.mofa-template-zarinpal .mofa-zp-submit {
    width: 48px;
    min-width: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mofa-template-zarinpal .mofa-zp-submit-wide {
    width: 100%;
}

.mofa-template-zarinpal .mofa-btn.is-loading {
    box-shadow: none;
    transform: none;
}

.mofa-template-zarinpal .mofa-btn:hover {
    background-color: var(--mofa-button-color-hover);
    box-shadow: none;
    transform: none;
}

.mofa-template-zarinpal .mofa-sms-login__action {
    justify-content: center;
}

.mofa-template-zarinpal .mofa-sms-login__action a {
    color: var(--mofa-action-color);
}

.mofa-template-zarinpal .mofa-sms-login__timer {
    justify-content: space-between;
    margin-bottom: 0;
}

.mofa-template-zarinpal .mofa-sms-login__messages {
    margin-top: 16px;
}

@media (max-width: 480px) {
    .mofa-template-zarinpal .mofa-zp-card {
        width: 100%;
    }

    .mofa-template-zarinpal .mofa-zp-otp-title {
        font-size: 28px;
    }

    .mofa-template-zarinpal .mofa-zp-otp-desc {
        font-size: 14px;
        line-height: 1.8;
    }

    .mofa-template-zarinpal .mofa-otp-field {
        --mofa-otp-box-size: 38px;
        --mofa-otp-gap: 5px;
    }

    .mofa-template-zarinpal .mofa-otp-box {
        font-size: 15px;
        border-radius: 6px;
    }

    .mofa-template-zarinpal .mofa-zp-otp-actions {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .mofa-template-zarinpal .mofa-zp-divider {
        display: none;
    }
}
