:root {
  --bg: #f4f6fb;
  --accent: #0A66CC;
  --accent-dark: #084AAD;
  --text: #1f2933;
  --muted: #6b7280;
  --card: #ffffff;
  --radius: 14px;
  --font-size: 24px;
  --btn-height: 48px;
  --btn-gap: 20px;
  --content-max: 1400px;
}

* {
  box-sizing: border-box;
  font-family: "Vazirmatn", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, var(--bg), #eef2fb 120%);
  direction: rtl;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  user-select: none;
}

.screen {
  display: none;
  width: 100%;
  height: 100vh;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.screen.active {
  display: flex;
}

.content {
  width: 96%;
  max-width: var(--content-max);
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 24px 48px rgba(10,20,40,0.08);
  margin: 16px auto;
  max-height: calc(100vh - 32px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

h1, h2 {
  color: var(--accent);
  margin: 6px 0 12px;
  font-size: 2.4rem;
  font-weight: 700;
}

p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 1.1rem;
}

.progress-bar {
  width: 100%;
  height: 14px;
  background: #e9eef8;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 18px;
}

.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg,var(--accent),var(--accent-dark));
  width: 0%;
  transition: width .36s ease;
}

#errorBox {
  display: none;
  color: #7a1b1b;
  background: #fff0f0;
  border: 1px solid #ffd6d6;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 18px;
  text-align: right;
  margin-bottom: 14px;
}

form {
  width: 100%;
}

.step {
  display: none;
  text-align: right;
}

label {
  display: block;
  margin-top: 18px;
  font-size: var(--font-size);
  color: var(--text);
  text-align: right;
}

input[type="text"], input[type="email"], textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 1.05rem;
  border-radius: 12px;
  border: 1px solid #dbe7ff;
  margin-top: 8px;
  background: #fbfdff;
  outline: none;
}

input:focus, textarea:focus {
  box-shadow: 0 10px 30px rgba(10,102,204,0.07);
  border-color: var(--accent);
}

input.error, textarea.error {
  border-color: #d33a3a;
}

/* دکمه‌ها */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 220px;
  padding: 0 18px;
  height: var(--btn-height);
  border-radius: 12px;
  border: none;
  font-size: 1.05rem;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 26px rgba(12,20,40,0.06);
  transition: transform .08s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none; /* مهم: حذف خط پیش‌فرض لینک */
}

/* حالت‌های لینک را هم صریحاً غیرفعال می‌کنیم */
.btn:link,
.btn:visited,
.btn:hover,
.btn:active,
.btn:focus {
  text-decoration: none;
  border-bottom: none;
  outline: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn.cancel {
  background: #6c757d;
}

.btn.disabled, .btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.buttons {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--btn-gap);
  justify-content: center;
  align-items: center;
}

.buttons .btn {
  flex: 0 0 48%;
}

/* دکمه‌های داخل welcome/thanks عرض یکسان دارند */
#welcome .content .btn,
#thanks .content .btn {
  width: 60%;
  max-width: 520px;
  font-size: 1.15rem;
  border-radius: 14px;
  height: 64px;
}

/* استایل اختصاصی info-btn: قرارگیری دقیق زیر دکمه بالا و حذف خط */
.info-btn {
  margin-top: 8px;            /* فاصلهٔ کم و منظم زیر دکمه اصلی */
  display: inline-flex;       /* همسان با .btn */
  text-decoration: none !important;
  border-bottom: none !important;
}

/* کلاس‌های جایگزین برای inline-style در بخش کد پیگیری */
.tracking-area {
  display: none;
  margin-top: 16px;
  font-size: 1.1rem;
  direction: rtl;
  text-align: center;
}

.tracking-code {
  display: inline-block;
  min-width: 120px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f3f7ff;
  margin-right: 8px;
  font-family: monospace;
  font-size: 1.35rem;
}

.step[data-step="1"],
.step[data-step="3"] {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 4%;
  justify-content: flex-start;
}

.step[data-step="1"] label,
.step[data-step="3"] label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 48%;
  padding: 14px;
  gap: 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #fcfdff;
  cursor: pointer;
  min-height: 64px;
  box-shadow: 0 8px 18px rgba(10,20,40,0.04);
  transition: background .12s ease, box-shadow .12s ease, transform .06s ease;
  font-size: 20px;
}

.step[data-step="1"] label:active,
.step[data-step="3"] label:active {
  transform: translateY(1px);
}

.step[data-step="1"] input[type="radio"],
.step[data-step="3"] input[type="radio"] {
  transform: scale(1.15);
  accent-color: var(--accent);
}

.step[data-step="1"] label.selected,
.step[data-step="3"] label.selected {
  border-color: rgba(10,102,204,0.18);
  background: linear-gradient(180deg, rgba(10,102,204,0.06), #fff);
  box-shadow: 0 14px 30px rgba(10,102,204,0.08);
}

.btn:focus, input:focus, textarea:focus, label:focus {
  outline: 3px solid rgba(10,102,204,0.10);
  outline-offset: 2px;
}

#review p {
  margin: 10px 0;
  font-size: 1.05rem;
  text-align: right;
}

@media (min-width:1280px) {
  :root {
    --font-size: 26px;
    --btn-height: 56px;
  }
  .content {
    padding: 56px;
    border-radius: 16px;
  }
  h1, h2 {
    font-size: 2.8rem;
  }
  .step[data-step="1"] label, .step[data-step="3"] label {
    font-size: 22px;
    padding: 18px;
    min-height: 76px;
  }
  input[type="text"], textarea {
    font-size: 1.15rem;
    padding: 18px;
  }
  #welcome .content .btn, #thanks .content .btn {
    height: 72px;
    font-size: 1.25rem;
  }
}

@media (max-width:720px) {
  :root {
    --font-size: 18px;
    --btn-height: 54px;
    --btn-gap: 12px;
  }
  .content {
    padding: 20px;
  }
  .step[data-step="1"], .step[data-step="3"] {
    gap: 8px 0;
  }
  .step[data-step="1"] label, .step[data-step="3"] label {
    width: 100%;
    margin: 4px 0;
  }
  .buttons .btn {
    flex: 0 0 100%;
  }

  /* در موبایل دکمه‌ها به صورت بلوکی زیر هم قرار می‌گیرند؛ info-btn هم سازگار است */
  #welcome .content .btn,
  #welcome .content .info-btn {
    width: 100%;
  }
}

.content > *:not(:last-child) {
  margin-bottom: 10px;
}
