/* =====================================================================================
 * ANI — UNIFIED SERVICE CENTER  (مرکز خدمات یکپارچهٔ آنی)
 * -------------------------------------------------------------------------------------
 * File : wwwroot/css/ani-services.css
 * ===================================================================================== */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  min-height: 100dvh;
  color: #eafff6;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background:
    radial-gradient(1100px 560px at 85% -12%, rgba(74, 157, 127, 0.55) 0%, rgba(74, 157, 127, 0) 62%),
    radial-gradient(820px 520px at -12% 18%, rgba(20, 82, 63, 0.85) 0%, rgba(20, 82, 63, 0) 58%),
    linear-gradient(160deg, #0a2a20 0%, #0f3d2e 48%, #175a45 100%);
  background-attachment: fixed;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.app {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ─── نوار بالا ─── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 10px;
  background: linear-gradient(rgba(10, 42, 32, 0.94), rgba(10, 42, 32, 0.55) 70%, rgba(10, 42, 32, 0));
  backdrop-filter: blur(12px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.logo__mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #fff;
  padding: 3px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  display: grid;
  place-items: center;
}

.logo__mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; }
.logo__text b { display: block; font-size: 0.98rem; line-height: 1.2; font-weight: 800; }
.logo__text small { display: block; font-size: 0.64rem; color: #a7d8c4; font-weight: 600; margin-top: 1px; }

.topbar__spacer { flex: 1; }

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #f0fff9;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

.chip-btn:hover { background: rgba(255, 255, 255, 0.22); }
.chip-btn:active { transform: scale(0.96); }

/* ─── هدر قهرمان ─── */
.hero { padding: 10px 0 4px; }
.hero h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.2px;
}
.hero h1 span { color: #a9f0d3; }
.hero p { margin: 0; color: #bfe8d8; font-size: 0.85rem; line-height: 1.7; }

.hero__stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.stat {
  flex: 1 1 0;
  min-width: 102px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 10px 12px;
  backdrop-filter: blur(8px);
}
.stat b { display: block; font-size: 1.05rem; font-weight: 800; }
.stat span { font-size: 0.68rem; color: #b7e3d1; }

/* ─── جستجو ─── */
.search {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 14px 30px rgba(4, 20, 14, 0.28);
  color: #1e5a47;
}
.search svg { width: 20px; height: 20px; opacity: 0.55; flex-shrink: 0; }
.search input {
  flex: 1;
  border: 0;
  outline: 0;
  font-family: inherit;
  font-size: 0.92rem;
  color: #163d30;
  background: transparent;
  min-width: 0;
}
.search input::placeholder { color: #7d958c; }

/* ─── چیپ دسته‌ها ─── */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 0 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #dff7ec;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
}

.chip.active {
  background: linear-gradient(135deg, #7fc7a4, #4a9d7f);
  color: #08251b;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(127, 199, 164, 0.32);
}

/* ─── بخش‌ها ─── */
.group { margin-bottom: 8px; }

.group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 12px;
}

.group__title {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.group__count { font-size: 0.72rem; color: #a9d9c6; font-weight: 600; }

.ani-tile__icon { cursor: pointer; }

.ani-tile__label { font-size: 0.74rem; }

.tile-badge {
  position: absolute;
  top: -3px;
  inset-inline-end: 0;
  z-index: 2;
  font-size: 0.52rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e6a34a, #d35400);
  color: #1b1004;
  box-shadow: 0 4px 10px rgba(211, 84, 0, 0.35);
  letter-spacing: 0.2px;
}

.tile-badge--new { background: linear-gradient(135deg, #7fe3bb, #35c08d); }

/* ─── شیت سرویس ─── */
.sheet { position: fixed; inset: 0; z-index: 60; display: none; }
.sheet.is-open { display: block; }

.sheet__scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 20, 14, 0.7);
  backdrop-filter: blur(6px);
  animation: scrimIn 0.22s ease both;
}

@keyframes scrimIn { from { opacity: 0; } to { opacity: 1; } }

.sheet__panel {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  max-height: 93dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(180deg, #113327 0%, #0b241a 100%);
  border-radius: 26px 26px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.45);
  animation: sheetUp 0.3s cubic-bezier(0.2, 0.9, 0.25, 1) both;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

@keyframes sheetUp {
  from { transform: translateY(36px); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet__grab {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.3);
  margin: 10px auto 0;
}

.sheet__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 14px;
  background: linear-gradient(rgba(17, 51, 39, 0.98), rgba(17, 51, 39, 0.88));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.sheet__icon {
  width: 52px;
  height: 52px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, #ffffff, #eaf6f0);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 #fff;
  flex-shrink: 0;
}
.sheet__icon svg { width: 36px; height: 36px; }

.sheet__titles { flex: 1; min-width: 0; }
.sheet__titles h2 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.sheet__titles p { margin: 2px 0 0; font-size: 0.72rem; color: #a9d9c6; }

.sheet__close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #eafff6;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.sheet__close:hover { background: rgba(255, 255, 255, 0.18); }

.sheet__body { padding: 16px 18px 8px; }
.sheet__body > .sec { margin-bottom: 18px; }
.sheet__body h3 { font-size: 0.86rem; margin: 0 0 10px; font-weight: 800; color: #d8f5e9; }
.sheet__body h3.muted { color: #a9d9c6; font-weight: 700; }

.muted { color: #a9d9c6; }
.small { font-size: 0.72rem; }
.tiny { font-size: 0.66rem; }
.center { text-align: center; }

/* ─── فرم‌ها ─── */
.field { margin-bottom: 12px; }
.field > label { display: block; font-size: 0.74rem; font-weight: 700; color: #bfe8d8; margin-bottom: 6px; }

.input, select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.88rem;
  color: #eafff6;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.input:focus, select:focus, textarea:focus {
  border-color: #7fc7a4;
  background: rgba(255, 255, 255, 0.11);
}
.input::placeholder, textarea::placeholder { color: #7fa79a; }
select option { background: #0f3327; color: #eafff6; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }

.seg {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px;
  border-radius: 14px;
  flex-wrap: wrap;
}
.seg button {
  flex: 1 1 0;
  min-width: 64px;
  border: 0;
  background: transparent;
  color: #bfe8d8;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 8px 6px;
  border-radius: 11px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.seg button.active { background: linear-gradient(135deg, #7fc7a4, #4a9d7f); color: #08251b; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 13px 16px;
  border-radius: 15px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  text-decoration: none;
}
.btn:active { transform: scale(0.985); }

.btn--primary {
  background: linear-gradient(135deg, #8fe0bd, #4a9d7f);
  color: #08251b;
  box-shadow: 0 12px 26px rgba(127, 199, 164, 0.28);
}
.btn--primary:hover { filter: brightness(1.05); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.09);
  color: #eafff6;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.16); }

.btn--gold {
  background: linear-gradient(135deg, #f2c17a, #d99a3d);
  color: #23150a;
  box-shadow: 0 12px 26px rgba(217, 154, 61, 0.24);
}

.btn--sm { padding: 9px 12px; font-size: 0.78rem; border-radius: 12px; }

.btn--row { display: flex; gap: 10px; }
.btn--row .btn { flex: 1; }

/* ─── کارت / لیست ─── */
.card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 14px;
}

.list { display: flex; flex-direction: column; gap: 10px; }

.item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 11px 12px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.item:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(127, 199, 164, 0.5); }
.item.is-active { border-color: #7fc7a4; background: rgba(127, 199, 164, 0.14); }
.item__main { flex: 1; min-width: 0; }
.item__main b { display: block; font-size: 0.86rem; font-weight: 800; }
.item__main span { display: block; font-size: 0.72rem; color: #a9d9c6; margin-top: 2px; }
.item__side { text-align: end; flex-shrink: 0; }
.item__side b { display: block; font-size: 0.86rem; font-weight: 800; color: #a9f0d3; }
.item__side span { display: block; font-size: 0.66rem; color: #93bfae; margin-top: 2px; }

.item__thumb {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  object-fit: cover;
  background: #163d30;
  flex-shrink: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(127, 199, 164, 0.16);
  color: #a9f0d3;
  border: 1px solid rgba(127, 199, 164, 0.3);
}
.pill--gold { background: rgba(230, 163, 74, 0.16); color: #f4ce93; border-color: rgba(230, 163, 74, 0.32); }
.pill--red { background: rgba(231, 76, 60, 0.16); color: #ffb3a8; border-color: rgba(231, 76, 60, 0.32); }

.hr { height: 1px; background: rgba(255, 255, 255, 0.1); margin: 14px 0; border: 0; }

/* ─── استپر کمّیت ─── */
.qty { display: inline-flex; align-items: center; gap: 5px; }
.qty button {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #eafff6;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.qty span { min-width: 22px; text-align: center; font-weight: 800; font-size: 0.85rem; }

/* ─── خلاصه پرداخت ─── */
.summary {
  background: rgba(127, 199, 164, 0.09);
  border: 1px solid rgba(127, 199, 164, 0.24);
  border-radius: 16px;
  padding: 12px 14px;
}
.summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 5px 0;
  color: #cfeee0;
}
.summary__row b { color: #fff; }
.summary__row--total {
  border-top: 1px dashed rgba(255, 255, 255, 0.18);
  margin-top: 6px;
  padding-top: 9px;
  font-size: 0.92rem;
  font-weight: 800;
}
.summary__row--total b { color: #a9f0d3; font-size: 1rem; }

/* ─── صندلی ─── */
.seat-map { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.seat {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #bfe8d8;
  font-size: 0.62rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.seat.is-taken { background: rgba(255, 255, 255, 0.04); color: #4f6e61; cursor: not-allowed; border-color: transparent; }
.seat.is-picked { background: linear-gradient(135deg, #7fc7a4, #4a9d7f); color: #08251b; border-color: transparent; }
.seat--aisle { visibility: hidden; }

/* ─── نوار پیشرفت ─── */
.progress {
  height: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7fc7a4, #c9f2df);
}

/* ─── چت دمو ─── */
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; padding: 4px; }
.bubble {
  max-width: 84%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 0.8rem;
  line-height: 1.7;
}
.bubble--bot { align-self: flex-start; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.12); border-bottom-left-radius: 4px; }
.bubble--me { align-self: flex-end; background: linear-gradient(135deg, #7fc7a4, #4a9d7f); color: #08251b; border-bottom-right-radius: 4px; font-weight: 600; }

/* ─── توست ─── */
.toast {
  position: fixed;
  inset-inline: 0;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  margin: 0 auto;
  width: max-content;
  max-width: 88vw;
  background: #f2fff9;
  color: #0b2e23;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: all 0.22s ease;
  z-index: 90;
}
.toast.show { opacity: 1; transform: none; }

.empty {
  text-align: center;
  padding: 22px 10px;
  color: #9cc7b6;
  font-size: 0.8rem;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 16px;
}

.footnote {
  text-align: center;
  color: #7fa79a;
  font-size: 0.68rem;
  padding: 22px 8px 10px;
  line-height: 1.9;
}

@media (min-width: 720px) {
  .sheet__panel { max-width: 640px; margin: 0 auto; border-radius: 26px 26px 0 0; }
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 1.3rem; }
  .stat { min-width: 90px; }
}
