/* Rasta Core — ورود و ثبت‌نام با کد پیامکی */

.rasta-auth { --a-blue: var(--t-blue, #2F6BFF); --a-blue-600: var(--t-blue-600, #1E4FD8); --a-blue-50: var(--t-blue-50, #EEF3FF); --a-ink: var(--t-ink, #0B1220); --a-ink-2: var(--t-ink-2, #344054); --a-muted: var(--t-muted, #667085); --a-line: var(--t-line, #E7EBF3); --a-soft: var(--t-soft, #F6F8FC); position: relative; width: 100%; max-width: 440px; margin: 24px auto; padding: 34px clamp(20px, 4vw, 34px) 28px; border: 1px solid rgba(220, 230, 255, .9); border-radius: 30px; background: radial-gradient(70% 60% at 50% 0%, rgba(47, 107, 255, .12), transparent 70%), #fff; box-shadow: 0 40px 80px -56px rgba(16, 24, 40, .55); color: var(--a-ink); direction: rtl; text-align: center; font-family: var(--rasta-font, inherit); isolation: isolate; }
.rasta-auth *, .rasta-auth *::before, .rasta-auth *::after { box-sizing: border-box; }
.rasta-auth::before { content: ""; position: absolute; inset: 10px; z-index: -1; border: 1.5px dashed rgba(47, 107, 255, .14); border-radius: 22px; pointer-events: none; }
.rasta-auth [hidden] { display: none !important; }
.rasta-auth .screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap; }

.rasta-auth__mark { display: block; width: 58px; height: 58px; margin: 0 auto 16px; overflow: hidden; border-radius: 18px; box-shadow: 0 16px 30px -16px rgba(37, 99, 235, .9); }
.rasta-auth__mark svg { display: block; width: 100%; height: 100%; }

.rasta-auth__step { margin: 0; animation: rastaAuthIn .35s ease both; }
.rasta-auth__title { margin: 0 0 6px; padding: 0; color: var(--a-ink); font-family: inherit; font-size: 21px; font-weight: 700; line-height: 1.6; }
.rasta-auth__desc { margin: 0 0 20px; color: var(--a-muted); font-size: 13.5px; line-height: 2; }
.rasta-auth__desc b { color: var(--a-ink); font-weight: 700; }

.rasta-auth__field { display: block; margin: 0 0 14px; text-align: right; }
.rasta-auth__field > span { display: block; margin: 0 0 6px; color: var(--a-ink-2); font-size: 13px; font-weight: 600; }
.rasta-auth input[type="tel"], .rasta-auth input[type="text"] { display: block; width: 100%; height: 54px; margin: 0; padding: 0 16px; border: 1px solid var(--a-line); border-radius: 16px; background: var(--a-soft); color: var(--a-ink); box-shadow: none; font: inherit; font-size: 16px; line-height: 1; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.rasta-auth input[type="tel"] { font-size: 18px; letter-spacing: .06em; text-align: center; }
.rasta-auth input:focus { border-color: var(--a-blue); outline: none; background: #fff; box-shadow: 0 0 0 4px rgba(47, 107, 255, .12); }
.rasta-auth .rasta-auth__code { height: 62px; font-size: 26px; font-weight: 700; letter-spacing: .55em; text-align: center; text-indent: .55em; }
.rasta-auth .rasta-auth__code::placeholder { color: #C0C7D6; letter-spacing: .45em; }
.rasta-auth .rasta-auth__hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.rasta-auth__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }

.rasta-auth .rasta-auth__btn, .rasta-auth .rasta-auth__btn:hover, .rasta-auth .rasta-auth__btn:focus { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 54px; margin: 6px 0 0; padding: 0 20px; border: 0; border-radius: 16px; background: var(--a-blue); color: #fff; box-shadow: 0 18px 32px -18px rgba(47, 107, 255, .95); font: inherit; font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer; transition: background .2s ease, transform .3s ease, opacity .2s ease; }
.rasta-auth .rasta-auth__btn:hover { background: var(--a-blue-600); transform: translateY(-1px); }
.rasta-auth .rasta-auth__btn:disabled { cursor: wait; opacity: .75; transform: none; }
.rasta-auth .rasta-auth__btn.is-busy { color: transparent; }
.rasta-auth .rasta-auth__btn.is-busy::after { content: ""; position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: rastaAuthSpin .7s linear infinite; }

.rasta-auth .rasta-auth__link, .rasta-auth .rasta-auth__link:hover, .rasta-auth .rasta-auth__link:focus { display: inline; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; color: var(--a-blue); font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.rasta-auth .rasta-auth__link:hover { text-decoration: underline; }
.rasta-auth__resend { margin-top: 14px; color: var(--a-muted); font-size: 13px; }

.rasta-auth__msg { min-height: 0; margin: 14px 0 0; color: #B42318; font-size: 13px; font-weight: 600; line-height: 1.9; }
.rasta-auth__msg:empty { margin: 0; }
.rasta-auth__msg.is-ok { color: #067647; }

@keyframes rastaAuthIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rastaAuthSpin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
    .rasta-auth { margin: 12px auto; padding: 28px 18px 22px; border-radius: 24px; }
    .rasta-auth::before { inset: 8px; border-radius: 18px; }
    .rasta-auth__row { grid-template-columns: minmax(0, 1fr); }
}


/* ================= پنجره‌ی ورود قبل از ثبت‌نام در دوره ================= */
html.rasta-auth-lock { overflow: hidden; }
.rasta-auth-modal { position: fixed; inset: 0; z-index: 100001; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.rasta-auth-modal[hidden] { display: none; }
.rasta-auth-modal__veil { position: fixed; inset: 0; background: rgba(11, 18, 32, .5); opacity: 0; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: opacity .25s ease; }
.rasta-auth-modal__panel { position: relative; width: 100%; max-width: 440px; opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1); }
.rasta-auth-modal.is-open .rasta-auth-modal__veil, .rasta-auth-modal.is-open .rasta-auth-modal__panel { opacity: 1; transform: none; }
.rasta-auth-modal .rasta-auth { margin: 0; box-shadow: 0 50px 100px -40px rgba(11, 18, 32, .6); }
.rasta-auth-modal__close { position: absolute; top: 14px; left: 14px; z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; margin: 0; padding: 0; border: 1px solid #E7EBF3; border-radius: 12px; background: #fff; color: #344054; box-shadow: none; cursor: pointer; transition: background .2s ease, color .2s ease; }
.rasta-auth-modal__close:hover { background: #FEF3F2; color: #B42318; }
.rasta-auth-modal__close svg { width: 18px; height: 18px; }