/* ==========================================================================
   Atour — فرم تماس (المان المنتور)
   رنگ‌ها از توکن‌های تنظیمات قالب می‌آیند؛ مقدارهای روبه‌رو فقط پشتیبانند.
   ========================================================================== */

.atour-form {
    --atour-surface: #ffffff;
    --atour-green: #00b894;
    --atour-green-dark: #027a62;
    --atour-on-green: #ffffff;
    --atour-mint: #e2f5ee;
    --atour-mint-soft: #eff9f1;
    --atour-ink: #162320;
    --atour-body: #2f3e3a;
    --atour-faint: #6b7b77;
    --atour-line: #dceae3;
    --atour-line-soft: #edf3f0;
    --atour-down: #c2373b;
    --atour-down-bg: #fdf2f2;
    --atour-form-radius: 14px;

    box-sizing: border-box;
    color: var(--atour-body);
}

.atour-form *,
.atour-form *::before,
.atour-form *::after { box-sizing: border-box; }

/* سرصفحه --------------------------------------------------------------- */

.atour-form__head { margin-bottom: 22px; }

.atour-form .atour-form__title {
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.6;
    color: var(--atour-ink);
}
.atour-form .atour-form__desc { margin: 0; font-size: 14.5px; line-height: 1.9; color: var(--atour-faint); }

/* فیلدها ---------------------------------------------------------------- */

.atour-form__form { position: relative; }

/* شبکه‌ی ۱۲ ستونی: عرض هر فیلد از ویجت (تمام، سه‌چهارم، دوسوم، نصف، یک‌سوم، یک‌چهارم)
   با متغیر --atour-span روی خود فیلد می‌آید. */
.atour-form__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
}

.atour-form__field {
    grid-column: span var(--atour-span, 12);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.atour-form .atour-form__field label {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--atour-faint);
}

/* ستاره‌ی فیلد اجباری ---------------------------------------------------------
   فقط یک‌جا می‌آید:
   ۱) برچسب پر است      ← جلوی متن برچسب
   ۲) فقط پلیس‌هولدر پر ← داخل کادر، درست بعد از متن پلیس‌هولدر
   ۳) هیچ‌کدام          ← گوشه‌ی داخل کادر
   اگر هر دو پر باشند فقط ستاره‌ی برچسب نمایش داده می‌شود. */

.atour-form__control { position: relative; display: block; }

.atour-form .atour-form__req {
    font-style: normal;
    font-weight: 700;
    line-height: 1;
    color: var(--atour-down);
}
.atour-form .atour-form__req--label { margin-inline-start: 3px; }

/* پلیس‌هولدرِ ستاره‌دار: پلیس‌هولدر واقعی یک فاصله است و این لایه، همان متن + ستاره را
   دقیقاً هم‌اندازه‌ی کادر نشان می‌دهد؛ با اولین حرف یا فوکوسِ پر، محو می‌شود. */
.atour-form .atour-form__ph {
    position: absolute;
    top: 0;
    height: 52px;
    inset-inline: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    white-space: nowrap;
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--atour-faint);
    opacity: .75;
    pointer-events: none;
}
.atour-form .atour-form__control.is-area .atour-form__ph {
    top: 14px;
    height: auto;
    align-items: flex-start;
}
.atour-form .atour-form__control input:not(:placeholder-shown) ~ .atour-form__ph,
.atour-form .atour-form__control textarea:not(:placeholder-shown) ~ .atour-form__ph { display: none; }

/* هیچ برچسب و پلیس‌هولدری نیست: ستاره گوشه‌ی داخل کادر */
.atour-form .atour-form__req--corner {
    position: absolute;
    top: 0;
    height: 52px;
    inset-inline-start: 16px;
    display: flex;
    align-items: center;
    pointer-events: none;
}
.atour-form .atour-form__control.has-corner input,
.atour-form .atour-form__control.has-corner select,
.atour-form .atour-form__control.has-corner textarea { padding-inline-start: 36px; }

/* رنگ پلیس‌هولدر همه‌ی فیلدها یکدست و با رنگ‌های شب سازگار */
.atour-form ::placeholder { color: var(--atour-faint); opacity: .75; }

/* لیست کشویی (دپارتمان، موضوع): مثل کادرهای پلیس‌هولدردار؛ تا چیزی انتخاب نشده،
   گزینه‌ی اولِ خالی با رنگ پلیس‌هولدر دیده می‌شود. */
.atour-form .atour-form__field select {
    appearance: none;
    -webkit-appearance: none;
    padding-inline-end: 42px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a9a95' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
}
html[dir="ltr"] .atour-form .atour-form__field select { background-position: right 16px center; }
.atour-form .atour-form__field select:required:invalid { color: var(--atour-faint); opacity: .75; }
.atour-form .atour-form__field select:has(option[value=""]:checked) { color: var(--atour-faint); opacity: .75; }
.atour-form .atour-form__field select option { color: var(--atour-ink); background: var(--atour-surface, #fff); }

.atour-form .atour-form__field input,
.atour-form .atour-form__field select,
.atour-form .atour-form__field textarea {
    width: 100%;
    min-height: 52px;
    padding: 13px 15px;
    border: 1px solid var(--atour-line);
    border-radius: var(--atour-form-radius);
    background: var(--atour-surface, #fff);
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--atour-ink);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.atour-form .atour-form__field textarea { min-height: 132px; resize: vertical; }

.atour-form .atour-form__field input:focus,
.atour-form .atour-form__field select:focus,
.atour-form .atour-form__field textarea:focus {
    outline: 0;
    border-color: var(--atour-green);
    box-shadow: 0 0 0 3px var(--atour-mint);
}
.atour-form .atour-form__field input:invalid:not(:placeholder-shown),
.atour-form .atour-form__field textarea:invalid:not(:placeholder-shown) { border-color: var(--atour-down); }

/* تله‌ی ربات ------------------------------------------------------------ */

/* دور از چشم، ولی بدون ساختن فضای اسکرول اضافه.
   نسخه‌ی قبلی left:-9999px بود که در صفحه‌ی راست‌چین یک ناحیه‌ی خالی
   ۱۰ هزار پیکسلی می‌ساخت و در موبایل صفحه سفید و اسکرول‌شدنی می‌شد. */
.atour-form__hp {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    overflow: hidden;
    white-space: nowrap;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
}

/* دکمه و پیام ----------------------------------------------------------- */

.atour-form__foot {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.atour-form .atour-form__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 0 30px;
    border: 0;
    border-radius: var(--atour-form-radius);
    background: var(--atour-green);
    color: var(--atour-on-green);
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background .18s ease, opacity .18s ease;
}
.atour-form .atour-form__btn:hover { background: var(--atour-green-dark); color: var(--atour-on-green); }
.atour-form .atour-form__btn:disabled { opacity: .65; cursor: default; }

.atour-form__note { font-size: 12.5px; color: var(--atour-faint); }

.atour-form .atour-form__msg {
    margin: 16px 0 0;
    padding: 13px 16px;
    border: 1px solid var(--atour-line);
    border-inline-start: 3px solid var(--atour-green);
    border-radius: 12px;
    background: var(--atour-mint-soft);
    font-size: 14px;
    color: var(--atour-body);
}
.atour-form .atour-form__msg.is-bad {
    border-inline-start-color: var(--atour-down);
    background: var(--atour-down-bg);
    color: var(--atour-down);
}

/* موبایل ---------------------------------------------------------------- */

@media (max-width: 767px) {
    .atour-form__grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
    .atour-form__field { grid-column: 1 / -1; }
    .atour-form .atour-form__title { font-size: 21px; }
    /* اگر مدیر جای دکمه را انتخاب کرده، در موبایل هم همان رعایت می‌شود */
    .atour-form:not(.has-btn-align) .atour-form__btn { width: 100%; }
}
