/* =====================================================================
   نوبتمه — سبک‌های تکمیلی صفحات عمومی و مشتری (گروه G1)
   صفحهٔ اصلی، صفحهٔ سالن، رزرو، تأیید رزرو و نوبت‌های من
   فقط از متغیرهای رنگ app.css استفاده می‌شود.
   ===================================================================== */

/* ---------- عمومی ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 24px; font-weight: 900; }
.page-head p { margin-top: 2px; }
.page-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--text2); font-weight: 600; }
.crumbs .ico { color: var(--border2); }
.pre-line { white-space: pre-line; }
.d-block { display: block; }
.center-row { justify-content: center; margin-top: 8px; }
/* کلاس‌هایی مانند .note نمایش flex دارند و ویژگی hidden را بی‌اثر می‌کنند */
[data-slots-status][hidden], [data-nojs][hidden] { display: none !important; }
.state.card { margin: 24px auto; max-width: 640px; }

/* ---------- صفحهٔ اصلی ---------- */
.hero .hero-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero .hero-stats div { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24); border-radius: 14px; padding: 10px 16px; min-width: 96px; }
.hero .hero-stats b { display: block; font-size: 22px; font-weight: 900; line-height: 1.4; }
.hero .hero-stats span { font-size: 12.5px; opacity: .88; }
.hero-search-title { font-size: 17px; }
.input-icon { position: relative; }
.input-icon .ico { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .input { padding-inline-start: 42px; }
.section-title p { margin-top: 2px; }
.salon-cover .cover-rating { position: absolute; top: 12px; inset-inline-end: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: var(--radius-pill); background: rgba(255,255,255,.92); color: var(--text); font-size: 13px; font-weight: 800; }
.salon-cover .cover-rating .ico { color: #F5A400; fill: #F5A400; }
.salon-card .foot { gap: 10px; flex-wrap: wrap; }
.from-price { font-size: 13px; color: var(--muted); }
.from-price b { color: var(--text); font-size: 14.5px; }
.how-step { display: flex; align-items: flex-start; gap: 14px; padding: 18px; }
.how-step h3 { font-size: 15.5px; margin-bottom: 2px; }

/* ---------- صفحهٔ سالن ---------- */
.salon-head .cover { background-color: #016B3E; background-image: url('../img/salon-header.jpg'); display: flex; align-items: flex-end; padding: 22px 24px; }
.salon-head .cover-text { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; color: #fff; }
.salon-head .cover-text h1 { color: #fff; font-size: clamp(22px, 3vw, 30px); font-weight: 900; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.salon-head .cover-text p { display: flex; align-items: center; gap: 6px; opacity: .92; font-weight: 600; }
.salon-head .cover-text .avatar { border: 2px solid rgba(255,255,255,.6); }
.row-item { display: inline-flex; align-items: center; gap: 6px; color: var(--text2); }
a.row-item { color: var(--green-d); font-weight: 700; }
.svc-group { font-size: 14.5px; color: var(--green-d); padding: 14px 0 4px; border-bottom: 1px solid var(--line); }
.svc-group:first-child { padding-top: 0; }
.service-row b { font-size: 15px; }
.service-row p { margin-top: 2px; }
.service-row .btn { flex-shrink: 0; }
.hours-table tr.closed td:last-child { color: var(--muted); }
.hours-table .break { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.hours-table .badge { margin-inline-start: 6px; }
.star-row { display: inline-flex; gap: 1px; vertical-align: middle; }
.star-row .on .ico { color: #F5A400; fill: #F5A400; }
.star-row .off .ico { color: var(--border2); fill: var(--track); }
.review .row { gap: 8px; }
.side-col { align-self: stretch; }
/* در عرض کم، layout-side یک ستون 1fr می‌شود؛ بدون min-width:0 ردیف روزها صفحه را افقی پهن می‌کند */
.layout-side > * { min-width: 0; }
.book-card .summary-row { align-items: center; }

/* ---------- رزرو ---------- */
.booking fieldset { min-width: 0; }
.steps { list-style: none; padding: 0; margin: 0; gap: 14px; }
.steps li { display: flex; align-items: center; }
.steps li + li::before { content: ''; width: 22px; height: 2px; background: var(--line); margin-inline-end: 14px; border-radius: 2px; }
.choice-list + .svc-group { margin-top: 10px; }
.svc-group + .choice-list { margin-top: 10px; }
.choice .grow small { font-weight: 500; }
.choice .price { color: var(--text); font-size: 14.5px; }
.nojs-row { margin-top: 14px; }
.day.closed { cursor: not-allowed; }
.day.closed .mn { color: var(--red); font-weight: 700; }
.day:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.slots.is-loading { opacity: .45; pointer-events: none; transition: opacity .15s; }
.slots:empty { display: none; }
.note .btn { margin-inline-start: auto; flex-shrink: 0; }
.summary-salon { padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; gap: 10px; flex-wrap: nowrap; }
.summary-salon small { display: block; }
.picked { list-style: none; margin: 0; padding: 4px 0 6px; border-bottom: 1px dashed var(--line); }
.picked li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; }
.picked li.muted { justify-content: flex-start; }
.summary-card .summary-total span:last-child { color: var(--green-d); }

/* ---------- تأیید رزرو ---------- */
.booked-page { max-width: 640px; margin: 0 auto; }
.booked-top { padding: 30px 24px 22px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.booked-top h1 { font-size: 23px; font-weight: 900; }
.success-ico.muted-ico { background: var(--chip-gray-bg); color: var(--chip-gray-fg); }
.ref-box { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 10px; padding: 10px 26px; border: 2px dashed var(--green); border-radius: var(--radius-md); background: var(--green-soft); }
.ref-box .ticket-ref { font-size: 22px; color: var(--green-d); }
.booked-kv { margin-bottom: 18px; }
.booked-sub { font-size: 15px; margin-bottom: 4px; }
.booked-actions { justify-content: center; }

/* ---------- نوبت‌های من ---------- */
.appt .body h3 { font-size: 16px; }
.appt .body h3 a { color: var(--text); }
.appt-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.appt-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.appt-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.my-review { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--hover); }
.my-review .row { gap: 8px; }
.rate-box > summary { list-style: none; display: inline-flex; }
.rate-box > summary::-webkit-details-marker { display: none; }
.rate-box[open] > summary { margin-bottom: 12px; }
.rate-form { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card); gap: 14px; max-width: 520px; }
.rate-form legend { margin-bottom: 8px; }
.rate-pick .chip { position: relative; }
.rate-pick .chip .ico { color: #F5A400; }
.rate-pick .chip:has(input:checked) .ico { fill: #F5A400; }
.rate-pick .chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

@media (max-width: 720px) {
  .page-head h1 { font-size: 21px; }
  .service-row { flex-wrap: wrap; }
  .service-row .grow { flex-basis: 100%; }
  .salon-head .cover { height: 180px; padding: 16px; }
  /* در گوشی، ستون اطلاعات (.grow) کنار دکمهٔ رزرو فشرده می‌شد و دکمه روی نشان «ساعت کاری» می‌افتاد:
     اطلاعات تمام‌عرض می‌شود و دکمه زیر آن می‌آید */
  .salon-head .info { padding: 16px; gap: 14px; }
  .salon-head .info > .grow { flex-basis: 100%; }
  .salon-head .info > .btn { width: 100%; }
  .salon-head .info .badge { white-space: normal; }
  .steps { gap: 10px 16px; }
  .steps li + li::before { display: none; }
  .appt-actions { justify-content: flex-start; }
}

/* سرصفحهٔ سایت (app.css) برای مشتری واردشده — برند + سه پیوند + زنگ + منوی کاربر — در عرض
   گوشی جا نمی‌شود و صفحه افقی اسکرول می‌خورد؛ در صفحات این گروه فشرده می‌شود */
@media (max-width: 480px) {
  .header-row { gap: 6px; }
  .header-row > * { min-width: 0; }
  .site-nav { gap: 0; }
  .site-nav a { padding: 8px 10px; }
  .header-actions { gap: 6px; flex-shrink: 0; }
  .header-actions .user-chip { gap: 4px; padding: 0 6px; }
}
@media (max-width: 400px) {
  /* نشان برند پیوند صفحهٔ اصلی می‌ماند؛ فقط نام متنی کنار آن برای کاربر واردشده پنهان می‌شود */
  .header-row:has(.user-chip) .brand-name { display: none; }
}

/* ---------- فهرست خطاهای فرم رزرو (بالای صفحه، با پیوند به هر بخش) ---------- */
.flash .err-list { margin: 6px 0 0; padding-inline-start: 18px; font-weight: 500; }
.flash .err-list li + li { margin-top: 4px; }
.flash .err-list a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
/* سرصفحهٔ چسبان سایت روی عنوان بخشی که با پیوند خطا به آن می‌رویم نیفتد */
.booking [id] { scroll-margin-top: 90px; }
