/* =========================
   FH FONT (Vazirmatn) — unified
========================= */
/* =========================
   FH FONT (Peyda) — unified
========================= */
@font-face {
    font-family: "FHFont";
    src: url("/assets/fonts/peyda/Peyda-Thin.woff2") format("woff2");
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "FHFont";
    src: url("/assets/fonts/peyda/peyda-extralight.woff2") format("woff2");
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "FHFont";
    src: url("/assets/fonts/peyda/peyda-light.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}


@font-face {
    font-family: "FHFont";
    src: url("/assets/fonts/peyda/Peyda-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "FHFont";
    src: url("/assets/fonts/peyda/Peyda-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}



@font-face {
    font-family: "FHFont";
    src: url("/assets/fonts/peyda/Peyda-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


@font-face {
    font-family: "FHFont";
    src: url("/assets/fonts/peyda/Peyda-Black.woff2") format("woff2");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Apply everywhere inside modal */
.fh-login2-modal,
.fh-login2-modal * {
    font-family: "FHFont", system-ui, -apple-system, "Segoe UI", Arial !important;
}


/* login2 modal (isolated) */
.fh-login2-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index:99999;
}

.fh-login2-modal{
  width:min(480px, 100%);
  background:#fff;
  border-radius:18px;
  box-shadow:0 20px 60px rgba(0,0,0,.18);
  overflow:hidden;
}


/* Mobile OTP: keep the whole modal inside the visible area above the keyboard */
@media (max-width: 640px) {
    .fh-login2-modal.is-otp-step {
        margin: 0;
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .fh-login2-modal.is-otp-step .fh-login2__head {
        padding: 28px 16px;
    }

    .fh-login2-modal.is-otp-step .fh-login2__body {
        padding: 30px 28px 32px;
    }

    .fh-login2-overlay.is-keyboard-open {
        align-items: center;
        justify-content: center;
        padding: 8px 12px;
    }

    .fh-login2-overlay.is-keyboard-open .fh-login2-modal.is-otp-step {
        max-height: calc(var(--fh-login2-vv-height, 100dvh) - 16px);
        margin: 0;
    }

    .fh-login2-overlay.is-keyboard-open .fh-login2-modal.is-otp-step .fh-login2__head {
        padding: 18px 16px;
    }

    .fh-login2-overlay.is-keyboard-open .fh-login2-modal.is-otp-step .fh-login2__body {
        padding: 20px 24px 22px;
    }
}

.fh-login2 {
    font-family: "FHFont", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: #111827;
}

.fh-login2__head {
    display: flex;
    align-items: center;
    justify-content: center;
    /* 👈 وسط */
    padding: 35px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    position: relative;
}

.fh-login2__title{
  font-size:16px;
  font-weight:700;
}
.fh-login2__title{
  font-size:16px;
  font-weight:700;
}

.fh-login2__title-login{
  color:#007dcc;
}

.fh-login2__title-register{
  color:#f53b6c;
}


.fh-login2__close{
  border:0;
  background:transparent;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  padding:6px 10px;
}

.fh-login2__body{
  padding:40px;
}

.fh-login2__hint{
  margin:0 0 14px 0;
  color:#374151;
  font-size:14px;
  line-height:1.8;
}

.fh-login2__actions{
  display:flex;
  justify-content:flex-start;
  gap:10px;
}

.fh-login2__btn{
  border:0;
  border-radius:12px;
  padding:10px 14px;
  background:#f53b6c;
  color:#fff;
  cursor:pointer;
  font-weight:600;
  box-shadow: 0 8px 18px rgba(245, 59, 108, .22);
  transition: .25s ease;
}

.fh-login2__btn:hover{
  background:#e92f61;
  box-shadow: 0 10px 24px rgba(245, 59, 108, .32);
}



.fh-login2__subtitle{
  font-size:14px;
  color:#111827;
  margin:2px 0 12px 0;
  font-weight:600;
}

.fh-login2__form{ display:block; }

.fh-login2__label{
  display:block;
  font-size:12px;
  color:#6b7280;
  margin:0 0 6px 0;
}
.fh-login2__field-title {
    margin: 0 0 10px 0;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    line-height: 1.8;
    text-align: right;
}
.fh-login2__input{
  width:100%;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  padding:12px 12px;
  font-size:14px;
  outline:none;
}

.fh-login2__input:focus{
  border-color: rgba(46,123,255,.65);
  box-shadow: 0 0 0 3px rgba(46,123,255,.15);
}
/* Password field with eye toggle */
.fh-password-field {
    position: relative;
    width: 100%;
}

.fh-password-field__input {
    padding-left: 52px;
}

.fh-password-field__toggle {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);

    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;

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

    cursor: pointer;
    padding: 0;
    opacity: .62;
    transition: .2s;
}

.fh-password-field__toggle:hover {
    background: rgba(46, 123, 255, .08);
    opacity: 1;
}

.fh-password-field__toggle img {
    width: 19px;
    height: 19px;
    display: block;
    object-fit: contain;
    pointer-events: none;
}
.fh-login2__btn--full{
  width:100%;
  margin-top:35px;
}

.fh-login2__note{
  margin:10px 0 0 0;
  font-size:12px;
  color:#6b7280;
  line-height:1.8;
}
/* VPN note - Step1 */
.fh-login2__note--vpn {
    margin: 14px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.fh-login2__note--vpn::before {
    content: "";
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: inline-block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='9' fill='%23EFF6FF' stroke='%2393C5FD' stroke-width='1.4'/%3E%3Cpath d='M10 5.5V11.2' stroke='%233B82F6' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='14.2' r='1.05' fill='%233B82F6'/%3E%3C/svg%3E");
}

/* فاصله دکمه بعد از پیام VPN */
.fh-login2__note--vpn + .fh-login2__btn--full {
    margin-top: 18px;
}

/* Divider under main button */
.fh-login2__divider {
    width: 100%;
    height: 1px;
    margin: 22px 0 0 0;
    background: linear-gradient(
        to left,
        transparent,
        rgba(17, 24, 39, .14),
        transparent
    );
}
.fh-login2__divider--after-submit {
    margin-top: 24px;
}

.fh-login2__divider--otp-bottom {
    margin: 22px 0 14px 0;
    background: rgba(17, 24, 39, .10);
}
/* =========================


   Soft transition when modal content changes (PASS <-> OTP)
========================= */
.fh-login2-modal.is-swapping .fh-login2 {
  opacity: 0;
  transform: translateY(8px);
}

.fh-login2-modal .fh-login2 {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
  will-change: opacity, transform;
}



/* OTP actions row (timer/resend) */
.fh-otp-actions {
    margin: 16px 0 0 0;
    width: 100%;

    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 12px;

    direction: ltr; /* مهم: جلوگیری از برعکس شدن ستون‌ها در RTL */
    font-size: 13px;
}

.fh-otp-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    font-weight: 700;
}

.fh-otp-action__icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}

.fh-otp-action--resend {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    direction: rtl;
    color: #2E7BFF;
}

.fh-otp-action--resend:hover {
    text-decoration: none;
}

.fh-otp-action--resend.is-disabled {
    opacity: .45;
    pointer-events: none;
}

.fh-otp-action--timer {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
    direction: ltr;
    color: #8b95a5;
}

.fh-otp-actions + .fh-login2__btn--full {
    margin-top: 20px;
}


/* Edit identifier icon inside OTP hint */
.fh-edit-identifier-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;

    width: 22px;
    height: 22px;
    margin: 0 4px;

    color: #2E7BFF;
    text-decoration: none;
    border-radius: 8px;
    transition: .2s;
}

.fh-edit-identifier-icon:hover {
    background: rgba(46, 123, 255, .08);
    text-decoration: none;
}

.fh-edit-identifier-icon svg {
    width: 17px;
    height: 17px;
    display: block;
}


/* ===== OTP bar (Resend/Timer) ===== */
.fh-login2__otpbar {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;

    /* فقط همین ردیف بره چپ */
    text-align: left;
    direction: ltr;

    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.fh-login2__otpbar a {
    color: inherit;
    text-decoration: none;
}

.fh-login2__otpbar a:hover {
    text-decoration: underline;
}

.fh-login2__otpsep {
    opacity: .7;
}


/* OTP Boxes */
.fh-otp-boxes {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}

.fh-otp-box {
    width: 44px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    outline: none;
    transition: 0.2s;
}

.fh-otp-box:focus {
    border-color: #2E7BFF;
    box-shadow: 0 0 0 2px rgba(46, 123, 255, .15);
    
}

.fh-otp-boxes {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 10px;
    direction: ltr;
    /* 👈 این خط مهمه */
}


.fh-login2 button,
.fh-login2 input {
  font-family: "FHFont", system-ui !important;
}


.fh-otp-box {
  font-feature-settings: "tnum";
  direction: ltr;
}



/* Inputs + buttons unified */
.fh-login2-modal input,
.fh-login2-modal button,
.fh-login2-modal textarea,
.fh-login2-modal select {
    font-family: "FHFont", system-ui, Arial !important;
}


/* Prevent input overflow (Step1 fix) */
.fh-login2__input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: block;
}

.fh-login2__body {
    overflow: hidden;
}

/* Placeholder font */
.fh-login2-modal input::placeholder,
.fh-login2-modal textarea::placeholder {
    font-family: "FHFont", system-ui, Arial !important;
    opacity: .65;
}



/* Better digit rendering in inputs (UI) */
.fh-login2-modal input {
    font-variant-numeric: lining-nums;
    letter-spacing: .2px;
}



.fh-login2-open-btn {
    font-family: "FHFont", system-ui, -apple-system, "Segoe UI", Arial !important;

    padding: 12px 20px;
    border-radius: 14px;
    border: 0;

    background: linear-gradient(135deg, #f53b6c, #d92b58);
    color: #fff;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
    transition: all .25s ease;
    box-shadow: 0 6px 18px rgba(245, 59, 108, .25);
}

/* Hover */
.fh-login2-open-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(245, 59, 108, .35);
}

.fh-login2-open-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(245, 59, 108, .25);
}





/* =========================
   Animated Modal Entrance
========================= */

/* Overlay fade */
.fh-login2-overlay {
    opacity: 0;
    animation: fhOverlayFade .25s ease forwards;
}

@keyframes fhOverlayFade {
    to {
        opacity: 1;
    }
}

/* Modal pop animation */
.fh-login2-modal {
    transform: scale(.92) translateY(12px);
    opacity: 0;
    animation: fhModalPop .28s cubic-bezier(.22, 1, .36, 1) forwards;
}

@keyframes fhModalPop {
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}


/* ===== Link styles (OTP / Back) ===== */
.fh-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    color: #3170c8;
}

.fh-link--lead {
    flex-direction: row-reverse;
    /* آیکن جلو متن */
}

.fh-bottom-nav {
    margin-top: var(--fh-bottom-gap);
    text-align: right;
    /* بازگشت سمت راست بماند */
}

.fh-link:hover {
    text-decoration: underline;
}

.fh-ic {
    width: 16px;
    height: 16px;
    display: inline-block;
    object-fit: contain;
}

/* فلش قبل متن */
.fh-ic--before {}

/* فلش بعد متن */
.fh-ic--after {}

/* فاصله قابل تنظیم بین لینک بالا و دکمه */
:root {
    --fh-pass-gap: 10px;
    --fh-bottom-gap: 50px;
}

.fh-pass-links {
    margin-top: 12px;
    width: 100%;
}
.fh-pass-links + .fh-login2__btn--full {
    margin-top: 22px;
}
.fh-pass-links .fh-link {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    border: 0;
    border-radius: 14px;
 background: #fff0f4;
color: #f53b6c;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;

    box-shadow: none
}

.fh-pass-links .fh-link:hover {
    background: #ffe1e9;
    text-decoration: none;
}

.fh-pass-links .fh-ic {
    width: 22px;
    height: 22px;
    opacity: 1;
}

.fh-pass-links .fh-ic path {
    stroke: currentColor;
}

.fh-otp-pass-link {
    margin-top: 14px;
    display: flex;
    justify-content: flex-start;
}

.fh-otp-pass-link .fh-link {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
}

.fh-otp-pass-link .fh-link:hover {
    text-decoration: none;
}
/* OR divider between password field and OTP login card */
.fh-login2__or {
    margin: 18px 0 14px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 700;
}

.fh-login2__or::before,
.fh-login2__or::after {
    content: "";
    height: 1px;
    flex: 1;
    background: rgba(17, 24, 39, .10);
}

.fh-login2__or span {
    white-space: nowrap;
    line-height: 1;
}
.fh-bottom-nav {
    margin-top: var(--fh-bottom-gap);
    display: flex;
    justify-content: flex-start;
}


.fh-link--lead {
    flex-direction: row-reverse;
    /* 👈 آیکن بیاد جلو */
}


.fh-link--lead {
    flex-direction: row-reverse;
}


.fh-login2__close{
  position:absolute;
  left:16px; /* 👈 سمت چپ */
  top:50%;
  transform:translateY(-50%);
  
  width:34px;
  height:34px;
  border-radius:50%;
  
  border:0;
  background:rgba(0,0,0,.05); /* 👈 دایره کم‌رنگ */
  
  display:flex;
  align-items:center;
  justify-content:center;
  
  font-size:18px;
  font-weight:700;
  cursor:pointer;
  
  transition:.2s;
}

.fh-login2__close:hover{
  background:rgba(0,0,0,.12);
}



/* =========================
   Button loading (no jump) + spinner
========================= */
.fh-login2__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* وقتی aria-busy=true شد */
.fh-login2__btn[aria-busy="true"] {
    opacity: .85;
    cursor: wait;
}

/* ثابت موندن عرض/ارتفاع دکمه و جلوگیری از پرش */
.fh-login2__btn[aria-busy="true"] {
    min-height: 44px;
}

/* اسپینر */
.fh-login2__btn[aria-busy="true"]::after {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .55);
    border-top-color: rgba(255, 255, 255, 1);
    animation: fhSpin .7s linear infinite;
    display: inline-block;
}

/* انیمیشن اسپین */
@keyframes fhSpin {
    to {
        transform: rotate(360deg);
    }
}

/* اگر دکمه input[type=submit] بود، اسپینر نداریم (با ::after نمی‌شه) */
input.fh-login2__btn[aria-busy="true"] {
    cursor: wait;
}