/* ══ Reset ══ */
.tcl-wrap * { box-sizing: border-box; margin: 0; padding: 0; }

/* ══ کارت اصلی ══ */
.tcl-wrap {
    font-family: Vazirmatn, 'Vazir', Tahoma, sans-serif;
    direction: rtl;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8e8e8;
    padding: 36px 28px 32px;
    margin: 0 auto;
}

/* ══ لوگو ══ */
.tcl-logo { text-align: center; margin-bottom: 24px; }
.tcl-logo img { max-height: 56px; width: auto; max-width: 180px; object-fit: contain; }
.tcl-logo-text { font-size: 24px; font-weight: 700; color: #2e7d32; }

/* ══ عنوان ══ */
.tcl-title { font-size: 19px; font-weight: 700; color: #1a1a1a; text-align: center; margin-bottom: 6px; line-height: 1.5; }
.tcl-subtitle { font-size: 14px; color: #888; text-align: center; margin-bottom: 22px; line-height: 1.7; }
.tcl-subtitle strong { color: #333; font-weight: 600; }

/* ══ فیلد ══ */
.tcl-field { margin-bottom: 12px; }

/* font-size 16px ضروری است — زیر 16px iOS زوم می‌کند */
.tcl-input {
    width: 100%;
    height: 52px;
    background: #fff;
    border: 1.5px solid #d9d9d9;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 16px;
    font-family: Vazirmatn, Tahoma, sans-serif;
    color: #1a1a1a;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    display: block;
    -webkit-appearance: none;
    appearance: none;
}
.tcl-input:focus { border-color: #2e7d32; box-shadow: 0 0 0 3px rgba(46,125,50,.10); }
.tcl-input::placeholder { color: #bbb; }
.tcl-otp-input { font-size: 24px; letter-spacing: 10px; font-weight: 700; text-align: center; padding: 0 8px; }

/* ══ دکمه ══ */
.tcl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    font-family: Vazirmatn, Tahoma, sans-serif;
    cursor: pointer;
    transition: background .2s, transform .1s;
    margin-top: 4px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.tcl-btn:hover:not(:disabled) { background: #256427; }
.tcl-btn:active:not(:disabled) { transform: scale(.98); }
.tcl-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ══ اسپینر ══ */
.tcl-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tcl-spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes tcl-spin { to { transform: rotate(360deg); } }

/* ══ پیام ══ */
.tcl-msg { border-radius: 8px; font-size: 14px; text-align: center; margin-bottom: 12px; transition: all .2s; }
.tcl-msg:empty { display: none; }
.tcl-msg.is-error { background: #fff3f3; border: 1px solid #ffd0d0; color: #c62828; padding: 10px 14px; }
.tcl-msg.is-ok    { background: #f0fff4; border: 1px solid #b2dfdb; color: #2e7d32; padding: 10px 14px; }

@keyframes tcl-shake {
    0%,100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}
.tcl-msg.shake { animation: tcl-shake .4s ease; }

/* ══ لینک‌ها ══ */
.tcl-actions { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; font-size: 14px; color: #999; flex-wrap: wrap; }
.tcl-sep { color: #ddd; }

.tcl-link {
    background: none;
    border: none;
    padding: 8px 4px;
    font-size: 14px;
    font-family: Vazirmatn, Tahoma, sans-serif;
    color: #2e7d32;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: #b2dfb2;
    transition: color .2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}
.tcl-link:disabled { color: #bbb; text-decoration: none; cursor: default; }

/* ══ دکمه بازگشت ══ */
.tcl-back {
    display: block;
    background: none;
    border: none;
    padding: 12px 0;
    margin-top: 10px;
    font-size: 13px;
    font-family: Vazirmatn, Tahoma, sans-serif;
    color: #bbb;
    cursor: pointer;
    transition: color .2s;
    text-align: center;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.tcl-back:hover { color: #666; }

/* ══ متن قوانین ══ */
.tcl-terms { font-size: 13px; color: #888; text-align: center; margin-top: 14px; line-height: 1.9; direction: rtl; unicode-bidi: embed; }
.tcl-terms a { color: #2e7d32; text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.tcl-terms a:hover { color: #1b5e20; }

/* ══ انیمیشن مرحله ══ */
.tcl-step { animation: tcl-fadein .25s ease; }
@keyframes tcl-fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ══ مخفی کردن footer لوگوی DIGITS ══ */
.digits_site_footer_box { display: none !important; }

/* ══ موبایل ══ */
@media (max-width: 480px) {
    .tcl-wrap { border-radius: 0; border: none; padding: 28px 20px calc(28px + env(safe-area-inset-bottom)); min-height: 100svh; }
    .tcl-title { font-size: 18px; }
    .tcl-otp-input { font-size: 20px; letter-spacing: 6px; }
    .tcl-btn { height: 56px; font-size: 17px; }
    .tcl-logo img { max-height: 48px; }
}
