/* Trenuje www — katalog demo (lista wyników z danych, piny cenowe, klastry) */

/* ── Lista wyników ── */
.tm-list { display: flex; flex-direction: column; gap: 12px; }

.tm-skeleton { display: flex; flex-direction: column; gap: 12px; }
.tm-skeleton i {
  display: block; height: 133px; border-radius: var(--r-card);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-sunken) 50%, var(--surface) 70%);
  background-size: 220% 100%;
  animation: tm-shine 1.25s linear infinite;
}
@keyframes tm-shine { to { background-position: -220% 0; } }
@media (prefers-reduced-motion: reduce) { .tm-skeleton i { animation: none; } }

.tm-more {
  margin-top: 6px; padding: 14px 20px; width: 100%;
  border: 1px solid var(--border-default); border-radius: var(--r-pill);
  background: var(--surface); color: var(--accent-strong);
  font-family: var(--font-sans); font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.tm-more:hover { background: var(--accent-soft); border-color: var(--accent); }
.tm-more-end {
  margin-top: 10px; text-align: center;
  font-size: 13.5px; color: var(--text-tertiary);
}

/* Tagi nie mogą wchodzić pod kolumnę z ceną: kurczy się tylko nazwa obiektu */
.rcard .tags { flex-wrap: nowrap; overflow: hidden; max-width: 100%; }
.rcard .tag { white-space: nowrap; flex: 0 0 auto; }

/* Nazwa obiektu (dane OSM) wyróżniona w tagach karty */
.rcard .tag-venue {
  background: var(--accent-subtle); color: var(--accent-strong);
  font-weight: 600; flex: 0 1 auto; min-width: 7ch; max-width: 260px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rcard .slot-chip {
  font-size: 12.5px; color: var(--success-text); background: var(--success-bg);
  border-radius: var(--r-pill); padding: 3px 10px; white-space: nowrap;
}
.rcard .slot-chip b { font-weight: 700; }

/* ── Podkategorie (dyscypliny sztuk walki) ── */
.fsubs {
  margin: 2px 0 6px 26px; padding-left: 12px;
  border-left: 2px solid var(--accent-subtle);
}
.fsubs-title {
  margin: 4px 0 2px; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-tertiary);
}
.fsubs .ftype { font-size: 14px; }
.fsubs .ftype .ticon { opacity: 0.55; }
#tm-sheet .ftype-sub { padding-left: 18px; }
#tm-sheet .ftype-sub .ticon { opacity: 0.55; }

/* ── Wyniki spoza promienia (jak w Booksy) ── */
.tm-nearby {
  display: flex; align-items: flex-start; gap: 14px;
  margin: 4px 0 12px; padding: 16px 18px;
  background: linear-gradient(180deg, var(--accent-soft), var(--surface));
  border: 1px solid var(--accent-subtle); border-radius: var(--r-card);
  box-shadow: var(--shadow-low);
}
.tm-nearby-ic {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--accent); box-shadow: var(--shadow-low);
}
.tm-nearby-txt { flex: 1; min-width: 0; }
.tm-nearby-txt b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 3px; }
.tm-nearby-txt b b { display: inline; font-size: inherit; color: var(--accent-strong); }
.tm-nearby-txt > span { display: block; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
.tm-nearby-txt > span b { display: inline; font-size: inherit; color: var(--accent-strong); margin: 0; }
.tm-nearby-more {
  flex: none; align-self: center; padding: 9px 16px;
  border: 1px solid var(--accent); border-radius: var(--r-pill);
  background: var(--surface); color: var(--accent-strong);
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.tm-nearby-more:hover { background: var(--accent); color: #fff; }
@media (max-width: 767px) {
  .tm-nearby { flex-wrap: wrap; }
  .tm-nearby-more { width: 100%; }
}

/* ── Piny cenowe ── */
.tm-pill-wrap { background: none; border: none; }
.tm-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 54px; height: 26px; padding: 0 10px;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--accent); border-radius: var(--r-pill);
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 700; line-height: 1;
  box-shadow: 0 2px 6px rgb(20 18 40 / 0.16);
  white-space: nowrap;
}
.tm-pill-studio { background: var(--accent); color: #fff; border-color: var(--accent-strong); }
.leaflet-marker-icon:hover .tm-pill { background: var(--accent-strong); color: #fff; }

/* ── Klastry ── */
.tm-cl-wrap { background: none; }
.tm-cl {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: hsl(250 70% 55% / 0.92); color: #fff;
  border: 3px solid hsl(250 70% 55% / 0.28); background-clip: padding-box;
  font-family: var(--font-sans); font-weight: 700; font-size: 13px;
  box-shadow: 0 2px 10px rgb(20 18 40 / 0.22);
}
.tm-cl-md { width: 46px; height: 46px; font-size: 13.5px; }
.tm-cl-lg { width: 54px; height: 54px; font-size: 14px; background: hsl(250 66% 47% / 0.94); }

/* ── Popup: wolny termin ── */
.tm-pop-free { font-size: 12.5px; color: var(--success-text); }
.tm-pop-free b { font-weight: 700; }

/* ── Profil demo: zajęte / minione terminy w grafiku ── */
.slot.slot-taken, .m-hour.slot-taken {
  opacity: 0.5; cursor: not-allowed;
  text-decoration: line-through; text-decoration-thickness: 1px;
}
.slot.slot-past, .m-hour.slot-past { opacity: 0.32; cursor: not-allowed; }
.slot-none {
  grid-column: 1 / -1; margin: 4px 0;
  font-size: 13.5px; color: var(--text-secondary);
}
#tm-free-chip {
  display: inline-block; margin-bottom: 8px; padding: 3px 10px;
  border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600;
  background: var(--success-bg); color: var(--success-text);
}
#tm-free-chip.none { background: var(--surface-sunken); color: var(--text-secondary); }
#tm-free-chip[hidden] { display: none; }
.m-day-none {
  display: block; width: 4px; height: 4px; margin: 3px auto 0;
  border-radius: 50%; background: var(--border-strong);
}

@media (max-width: 767px) {
  .rcard .tag-venue { max-width: 100%; white-space: normal; }
  /* Wolny termin jest mocnym sygnałem „to żyje" — na mobile pod ceną, po prawej. */
  .rcard .slot-chip {
    grid-area: slot; justify-self: end; align-self: start;
    margin-top: 4px; font-size: 11px; padding: 3px 8px;
  }
}

/* ── Zdjęcia trenerów: twarz jest w górnej części kadru ── */
/* Kwadratowe portrety w prostokątnych/kołowych ramkach domyślnie kadrują się na wysokości
   klatki piersiowej — przesuwamy okno kadru do góry. */
.rcard .thumb { object-position: 50% 18%; }
.tm-pop img { object-position: 50% 18%; }
.hero-photo,
.m-hero-photo,
.summary-row.with-avatar img,
.m-bar > img,
.review-head img { object-position: 50% 16%; }

/* ── Wybór usługi w panelu rezerwacji ── */
.booking-panel { position: relative; }
.select-pill { cursor: pointer; }
.tm-service-menu {
  position: absolute; z-index: 40; left: 0; right: 0; margin-top: 4px;
  background: var(--surface); border: 1px solid var(--border-default);
  border-radius: 14px; box-shadow: var(--shadow-med); overflow: hidden;
}
.tm-service-menu[hidden] { display: none; }
.tm-service-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 12px 16px; background: none; border: 0; cursor: pointer;
  font-family: var(--font-sans); font-size: 14px; color: var(--text-primary); text-align: left;
}
.tm-service-opt:hover { background: var(--accent-soft); }
.tm-service-opt.sel { background: var(--accent-subtle); color: var(--accent-strong); font-weight: 700; }
.tm-service-opt b { font-weight: 700; white-space: nowrap; }

/* ── Miejsce treningu (nazwa obiektu z OSM) ── */
.tm-venue-card { display: block; padding: 18px 20px; }
.tm-venue-label {
  display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 6px;
}
.tm-venue-card strong {
  display: block; font-family: var(--font-display); font-size: 19px; font-weight: 800;
  color: var(--ink); letter-spacing: -0.01em;
}
.tm-venue-meta { display: block; margin-top: 4px; font-size: 14px; color: var(--text-secondary); }
.tm-venue-note { display: block; margin-top: 8px; font-size: 12.5px; color: var(--text-tertiary); }

/* ── Wybór usługi na mobile ── */
.m-service-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.m-service-pick button {
  flex: 1 1 auto; min-height: 52px; padding: 8px 12px;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  border: 1px solid var(--border-default); border-radius: 14px; background: var(--surface);
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 600; color: var(--text-primary);
}
.m-service-pick button b { font-size: 12px; font-weight: 700; color: var(--text-tertiary); }
.m-service-pick button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.m-service-pick button.on b { color: var(--accent-strong); }

/* ── Rezerwacja niemożliwa bez wolnej godziny ── */
.is-disabled,
button.is-disabled {
  opacity: 0.45; cursor: not-allowed; pointer-events: none; filter: grayscale(0.35);
}

/* ── Mobile: opinie i lokalizacja na profilu ── */
#m-location .tm-minimap { height: 150px; margin: 10px 0 12px; }
.m-loc-addr { display: block; }
.m-loc-addr strong { display: block; font-size: 15px; color: var(--ink); }
.m-loc-addr span { display: block; margin-top: 2px; font-size: 13.5px; color: var(--text-secondary); }
.m-loc-link { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--accent-strong); }

.m-rev-score { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.m-rev-score b { font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.m-rev-score span { color: var(--star); letter-spacing: 1px; }
.m-rev-score i { font-style: normal; font-size: 12.5px; color: var(--text-tertiary); }
.m-rev { padding: 12px 0; border-top: 1px solid var(--border-subtle); }
.m-rev-head { display: flex; align-items: center; gap: 10px; }
.m-rev-head strong { display: block; font-size: 14px; color: var(--ink); }
.m-rev-head > div { flex: 1; min-width: 0; }
.m-rev-head > div span { display: block; font-size: 11.5px; color: var(--text-tertiary); }
.m-rev-head .review-initials {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px;
  border-radius: 50%; background: var(--accent-subtle); color: var(--accent-strong);
  font-size: 12px; font-weight: 700; line-height: 1;
}
.m-rev-stars { flex: none; color: var(--star); font-size: 12.5px; letter-spacing: 1px; }
.m-rev p { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--text-secondary); }

/* ── Karty wyróżnionych na stronie głównej (układ 1:1 z makiety) ── */
.hm-card {
  position: relative;
  cursor: pointer;               /* cały kafel klikalny — nawigację robi js/home-map.js */
  touch-action: manipulation;    /* bez double-tap zoom; poziomy swipe scrollera zostaje */
  display: grid; align-content: start;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-areas:
    "photo body"
    "cta   cta";
  gap: 0 12px;
  padding: 12px 12px 12px;
  background: var(--surface); border-radius: var(--r-hero);
  box-shadow: var(--shadow-high);
}
/* Badge na zdjęciu (osobny wiersz to zmarnowane 30 px), ale w DOLNYM rogu —
   u góry nachodził na twarz portretu. */
.hm-photo { grid-area: photo; position: relative; width: 112px; height: 112px; }
.hm-card .badge-mono {
  position: absolute; left: 6px; bottom: 6px; z-index: 2;
  font-size: 0.56rem; padding: 3px 8px;
  background: hsl(0 0% 100% / 0.92); backdrop-filter: blur(4px);
}
.hm-photo img {
  width: 100%; height: 100%;
  border-radius: 12px; object-fit: cover; object-position: 50% 12%;
}
.hm-body { grid-area: body; min-width: 0; }
.hm-body h3 {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-size: 18px; font-weight: 800;
  color: var(--ink); letter-spacing: -0.015em; line-height: 1.12;
  max-height: 2.3em; overflow: hidden;
}
.hm-body h3 svg { flex: none; width: 16px; height: 16px; }
.hm-meta {
  margin-top: 4px; font-size: 12.5px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hm-rate {
  display: flex; align-items: center; gap: 5px; margin-top: 5px;
  font-size: 12px; color: var(--text-secondary); white-space: nowrap;
}
.hm-rate b { font-size: 14px; color: var(--accent-strong); font-weight: 800; }
.hm-rate span { color: var(--star); letter-spacing: 1px; }
.hm-tags { display: flex; flex-wrap: nowrap; gap: 5px; margin-top: 7px; overflow: hidden; }
.hm-tags .tag { font-size: 11px; padding: 3px 9px; white-space: nowrap; }
.hm-cta { grid-area: cta; display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.hm-btn {
  flex: 1; padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--accent); color: #fff; text-align: center; font-size: 15px; font-weight: 700;
}
.hm-btn:hover { background: var(--accent-strong); }
.hm-fav {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--border-default); color: hsl(245 10% 62%); background: var(--surface);
}
.hm-fav:hover { border-color: var(--accent); color: var(--accent); }
.hm-fav.fav-on { color: hsl(350 78% 58%); border-color: hsl(350 78% 58%); }
