/* ===== Auth full-screen modal (OpenAI-like) ===== */
body.cyrus-auth-modal-open { overflow: hidden; }

.cyrus-auth-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}
.cyrus-auth-modal[hidden]{ display:none; }

.cyrus-auth-modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(10px);
}

/* Card */

.cyrus-auth-modal-card{
  position: relative;

  width: min(560px, 100%);          
  max-height: calc(100vh - 56px);
  min-height: 360px;              /* درازتر */
  overflow: auto;

  padding: 30px 24px 26px;        /* یه کم فضای داخلی بیشتر */      
  border-radius: 22px;

  background: rgba(255,255,255,0.86);
  border: 1px solid var(--cyrus-header-border);
  box-shadow: 0 22px 70px rgba(0,0,0,0.25);
  backdrop-filter: blur(14px);
}

html:not([data-theme="light"]) .cyrus-auth-modal-card{
  background: rgba(18,20,26,0.86);
}

/* Close button */
.cyrus-auth-modal-x{
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;

  width: 36px;
  height: 36px;
  border-radius: 999px;

  border: 1px solid var(--cyrus-header-border);
  background: rgba(0,0,0,0.06);
  color: inherit;
  cursor: pointer;
}
html:not([data-theme="light"]) .cyrus-auth-modal-x{
  background: rgba(255,255,255,0.08);
}

/* Title + subtitle */
.cyrus-auth-modal-title{
  font-size: 34px;
  font-weight: 700;
  text-align: center;
  margin: 6px 0 26px;   /* فاصله‌ی پایین بیشتر */

}

.cyrus-auth-modal-sub{
  text-align: center;
  font-size: 14px;
  opacity: 0.75;
  margin: 0 0 10px;
}

/* Small note (like "Don't have an account? Sign up") */
.cyrus-auth-modal-note{
  text-align: center;
  font-size: 14px;
  opacity: 0.9;
  margin: 0 0 14px;
}
.cyrus-auth-modal-note a{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Providers: make them tighter only inside modal */

/* استایل دکمه‌های مودال Welcome back & Connect to Apps */
.cyrus-auth-modal .cyrus-auth-provider {
  width: min(360px, 100%);
  margin: 10px auto;        /* فاصله عمودی یکسان برای همه */
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 999px;     /* برگردوندن گردی */
  border: 1px solid var(--cyrus-header-border);
  background: rgba(255,255,255,0.92);
  transition: background 0.2s;
}

html:not([data-theme="light"]) .cyrus-auth-modal .cyrus-auth-provider {
  background: rgba(255,255,255,0.06);
}

.cyrus-auth-modal .cyrus-auth-provider:hover {
  background: rgba(0,0,0,0.04);
}

html:not([data-theme="light"]) .cyrus-auth-modal .cyrus-auth-provider:hover {
  background: rgba(255,255,255,0.10);
}

/* OR کمی فاصله‌ی بالا/پایین بیشتر بگیرد */
.cyrus-auth-modal .cyrus-auth-or{
  margin: 18px 0 14px; /* قبلاً 10px 0 6px بود */
}

/* Bottom links inside modal */
.cyrus-auth-modal-links{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  margin-top: 10px;
  font-size: 13px;
  opacity: 0.85;
}
.cyrus-auth-modal-links a{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* وسط‌چین کردن کانتینر شماره */
.cyrus-phone-container {
    display: flex;
    align-items: center;
    justify-content: center;  /* مرکز افقی */
    gap: 0.5rem;
    margin: 1.5rem 0;
    direction: ltr;
}

/* دکمه مخصوص درخواست کد (کوچک و وسط‌چین) */
#otpRequestBtn {
    width: auto !important;       /* حذف عرض ۱۰۰٪ */
    min-width: 140px;
    padding: 0.6rem 1.2rem !important;
    margin: 0 auto !important;    /* وسط‌چین */
    font-size: 14px;
    border-radius: 40px;
    background: var(--cyrus-header-primary, #3b82f6);
    color: white;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

#otpRequestBtn:hover {
    opacity: 0.9;
}

/* همچنین اگر سایر دکمه‌های OTP را هم خواستی کوچک کنی */
#otpVerifyBtn {
    width: auto !important;
    min-width: 140px;
    padding: 0.6rem 1.2rem !important;
    margin: 0 auto !important;
}
/* Email/password auth panel */
.cyrus-email-auth-panel {
  width: min(360px, 100%);
  margin: 0 auto 14px;
}
html:not([data-theme="light"]) .cyrus-email-auth-panel {
  background: transparent;
}
.cyrus-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.cyrus-email-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.cyrus-email-auth-tabs button {
  border: 1px solid var(--cyrus-header-border);
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.85);
  color: inherit;
  cursor: pointer;
  font-weight: 600;
}
.cyrus-email-auth-tabs button.is-active {
  background: var(--cyrus-header-primary, #3b82f6);
  color: #fff;
  border-color: transparent;
}
.cyrus-email-auth-hint {
  font-size: 12px;
  opacity: 0.72;
  margin: 2px 2px 10px;
  text-align: center;
}
.cyrus-email-auth-form {
  display: grid;
  gap: 12px;
}
.cyrus-email-auth-form label {
  display: block;
}
.cyrus-email-auth-form input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--cyrus-header-border);
  border-radius: 999px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.94);
  color: inherit;
  font-size: 15px;
}
html:not([data-theme="light"]) .cyrus-email-auth-form input {
  background: rgba(255,255,255,0.08);
}
.cyrus-email-auth-error {
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.4;
}
.cyrus-email-auth-submit {
  justify-content: center !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 13px 18px !important;
  background: var(--cyrus-header-primary, #3b82f6) !important;
  color: #fff !important;
}
.cyrus-email-auth-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}
.cyrus-email-auth-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: -2px;
}
.cyrus-email-auth-actions button {
  border: 0;
  background: transparent;
  color: var(--cyrus-header-primary, #3b82f6);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 6px;
}
.cyrus-email-auth-actions button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.cyrus-auth-email-display {
  width: min(360px, 100%);
  margin: 0 auto 4px;
  padding: 0 6px;
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0.78;
  text-align: center;
  word-break: break-word;
}

.cyrus-email-auth-actions-wrap {
  flex-wrap: wrap;
  row-gap: 4px;
}

.cyrus-email-auth-form[hidden] {
  display: none !important;
}

.cyrus-email-auth-form input::placeholder {
  color: rgba(15, 23, 42, 0.48);
}

html:not([data-theme="light"]) .cyrus-email-auth-form input::placeholder {
  color: rgba(248, 250, 252, 0.58);
}

html:not([data-theme="light"]) .cyrus-email-auth-error {
  color: #fca5a5;
}

.cyrus-email-auth-submit {
  border-radius: 999px !important;
}

@media (max-width: 520px) {
  .cyrus-auth-modal-card {
    width: min(100%, 420px);
    padding: 28px 18px 24px;
  }

  .cyrus-auth-modal-title {
    font-size: 30px;
  }

  .cyrus-email-auth-actions {
    flex-wrap: wrap;
  }
}