/* =========================================================
   سپید۲۴ — دکمه شناور + فرم درخواست سریع رزرو (جایگزین Chaty)
   v1.0.0 — RTL · تم فضایی
   ========================================================= */

:root {
  --sqr-violet: #7c3aed;
  --sqr-indigo: #4338ca;
  --sqr-ink: #1b2559;
  --sqr-muted: #5b6478;
  --sqr-line: #e8ecf4;
}

/* ---------- دکمه شناور ---------- */
.sqr-fab {
  position: fixed; z-index: 99990;
  inset-inline-end: 16px; bottom: 18px;
  display: flex; align-items: center; gap: 9px;
  border: none; cursor: pointer; font-family: inherit; direction: rtl;
  background: linear-gradient(135deg, #4338ca 0%, #7c3aed 55%, #9333ea 100%);
  color: #fff; font-weight: 800; font-size: 13.5px;
  padding: 12px 17px; border-radius: 999px;
  box-shadow: 0 14px 34px rgba(124, 58, 237, .45);
  transition: transform .18s ease, box-shadow .18s ease;
}
.sqr-fab:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 18px 42px rgba(124, 58, 237, .55); }
.sqr-fab-ico { font-size: 19px; line-height: 1; }
.sqr-fab-ring {
  position: absolute; inset: -4px; border-radius: 999px;
  border: 2px solid rgba(147, 51, 234, .55);
  animation: sqrPulse 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes sqrPulse {
  0%   { transform: scale(.96); opacity: .9; }
  70%  { transform: scale(1.22); opacity: 0; }
  100% { transform: scale(1.22); opacity: 0; }
}
@media (max-width: 768px) {
  .sqr-fab { inset-inline-end: 12px; bottom: 86px; padding: 11px 14px; font-size: 12.5px; }
  .sqr-fab-txt { font-size: 12px; }
}

/* ---------- رفع باگ تب‌ها: hidden روی فیلدهای flex نادیده گرفته می‌شد ----------
   (display:flex قالب‌بندی نویسنده بر display:none مرورگر برای [hidden] می‌چربید
   و فیلدهای هتل/پرواز/قطار همزمان نمایان می‌ماندند) */
#sqr-root [hidden] { display: none !important; }

/* ---------- مودال ---------- */
.sqr-modal { position: fixed; inset: 0; z-index: 99999; }
.sqr-backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 8, 26, .68); backdrop-filter: blur(4px);
  animation: sqrFade .2s ease;
}
@keyframes sqrFade { from { opacity: 0; } to { opacity: 1; } }

.sqr-card {
  position: absolute; inset-inline: 0; bottom: 0; top: auto;
  max-width: 560px; margin: 0 auto; max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 24px 24px 0 0;
  padding: 22px 20px 18px;
  box-shadow: 0 -20px 60px rgba(4, 8, 28, .5);
  animation: sqrUp .28s cubic-bezier(.2, .9, .3, 1.2);
}
@media (min-width: 640px) {
  .sqr-card {
    top: 50%; bottom: auto; inset-inline: 0;
    transform: translateY(-50%);
    border-radius: 24px;
    animation: sqrPop .25s cubic-bezier(.2, .9, .3, 1.15);
  }
  @keyframes sqrPop { from { opacity: 0; transform: translateY(calc(-50% + 18px)) scale(.97); } to { opacity: 1; transform: translateY(-50%) scale(1); } }
}
@keyframes sqrUp { from { transform: translateY(60px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.sqr-x {
  position: absolute; top: 14px; inset-inline-start: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--sqr-line); background: #f6f7fc; color: var(--sqr-muted);
  font-size: 14px; cursor: pointer; font-family: inherit;
  transition: all .15s ease;
}
.sqr-x:hover { background: #fee2e2; color: #dc2626; border-color: #fecaca; }

.sqr-head { text-align: center; margin-bottom: 14px; }
.sqr-head-ico { font-size: 30px; display: block; margin-bottom: 4px; }
.sqr-head h3 { margin: 0 0 6px; font-size: 18px; font-weight: 900; color: var(--sqr-ink); }
.sqr-head p { margin: 0; font-size: 12.5px; color: var(--sqr-muted); line-height: 1.9; }

/* تب‌ها */
.sqr-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px;
  background: #f1f3fb; border: 1px solid var(--sqr-line);
  padding: 5px; border-radius: 15px; margin-bottom: 14px;
}
.sqr-tab {
  border: none; background: transparent; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 800; color: var(--sqr-muted);
  padding: 9px 6px; border-radius: 11px; transition: all .15s ease;
}
.sqr-tab.is-active {
  background: linear-gradient(135deg, #4338ca, #7c3aed);
  color: #fff; box-shadow: 0 6px 16px rgba(124, 58, 237, .35);
}

/* فیلدها */
.sqr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.sqr-field { display: flex; flex-direction: column; gap: 5px; }
.sqr-field.sqr-half { grid-column: span 1; }
.sqr-field[data-sqr-show="hotel"], .sqr-field[data-sqr-show="flight"], .sqr-field[data-sqr-show="train"] { grid-column: 1 / -1; }
.sqr-field label { font-size: 11.5px; font-weight: 800; color: var(--sqr-muted); }
.sqr-field label b { color: #dc2626; }
.sqr-field input, .sqr-field select {
  border: 1.5px solid var(--sqr-line); border-radius: 12px;
  padding: 10px 12px; font-size: 13.5px; font-family: inherit;
  background: #fbfcff; color: var(--sqr-ink); width: 100%; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.sqr-field input:focus, .sqr-field select:focus { border-color: var(--sqr-violet); box-shadow: 0 0 0 3px rgba(124, 58, 237, .13); }
.sqr-hp { position: absolute; inset-inline-start: -9999px; opacity: 0; height: 0; width: 0; }

/* ارسال */
.sqr-submit {
  width: 100%; margin-top: 14px; border: none; cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, #4338ca 0%, #7c3aed 60%, #9333ea 100%);
  color: #fff; font-weight: 900; font-size: 15px;
  padding: 14px; border-radius: 15px;
  box-shadow: 0 14px 30px rgba(124, 58, 237, .4);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.sqr-submit:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(124, 58, 237, .5); }
.sqr-submit[disabled] { opacity: .6; cursor: wait; transform: none; }

.sqr-alt {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px 14px;
  margin-top: 13px; padding-top: 12px; border-top: 1px dashed var(--sqr-line);
  font-size: 12.5px; color: var(--sqr-muted);
}
.sqr-alt a {
  color: var(--sqr-indigo); text-decoration: none; font-weight: 800;
  background: #f4f2ff; border: 1px solid #e5ddfb; padding: 6px 13px; border-radius: 999px;
  transition: all .15s ease;
}
.sqr-alt a:hover { background: var(--sqr-violet); color: #fff; border-color: var(--sqr-violet); }

.sqr-ok { text-align: center; padding: 18px 6px 8px; }
.sqr-ok-ico { font-size: 42px; display: block; margin-bottom: 8px; }
.sqr-ok b { font-size: 16px; color: #0d9f6e; display: block; margin-bottom: 6px; }
.sqr-ok p { margin: 0; font-size: 13px; color: var(--sqr-muted); line-height: 2; }
.sqr-ok a { color: var(--sqr-indigo); font-weight: 800; text-decoration: none; }

.sqr-err {
  margin-top: 12px; padding: 11px 14px; border-radius: 12px;
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  font-size: 12.5px; font-weight: 700; line-height: 1.9;
}

@media (max-width: 480px) {
  .sqr-grid { grid-template-columns: 1fr; }
  .sqr-field.sqr-half { grid-column: 1 / -1; }
  .sqr-card { padding: 18px 14px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .sqr-fab-ring, .sqr-backdrop, .sqr-card { animation: none !important; }
}

/* بدنه هنگام باز بودن مودال */
body.sqr-lock { overflow: hidden; }
