@import url("./variables.css");

/*
 * Страница онлайн-записи и «Моя запись».
 * --brand — фирменный цвет салона (задаётся из настроек), остальное выводится из него.
 */
:root {
  --brand: #534AB7;
  --brand-soft: color-mix(in srgb, var(--brand) 10%, #fff);
  --brand-softer: color-mix(in srgb, var(--brand) 5%, #fff);
  --brand-border: color-mix(in srgb, var(--brand) 28%, #fff);
  --brand-strong: color-mix(in srgb, var(--brand) 82%, #000);
  --pb-bg: #f6f6f8;
  --pb-card: #ffffff;
  --pb-line: rgba(15, 23, 42, 0.08);
  --pb-text: #18181b;
  --pb-muted: #71717a;
  --pb-radius: 18px;
}

.public-booking-page {
  min-height: 100vh;
  background: var(--pb-bg);
  color: var(--pb-text);
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------------------
 * Обложка салона
 * ------------------------------------------------------------------------- */

.pb-cover {
  position: relative;
  background: var(--pb-card);
  border-bottom: 1px solid var(--pb-line);
}

.pb-cover__band {
  height: 112px;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--brand) 55%, #fff) 0%, transparent 55%),
    var(--brand);
}

.pb-cover__inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px 20px;
}

.pb-logo {
  width: 76px;
  height: 76px;
  margin-top: -38px;
  margin-bottom: 12px;
  border-radius: 22px;
  border: 4px solid var(--pb-card);
  background: var(--brand-soft);
  color: var(--brand-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.pb-cover__title {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.pb-cover__description {
  margin: 0 0 12px;
  color: var(--pb-muted);
  font-size: 15px;
  line-height: 1.5;
}

.pb-cover__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--pb-bg);
  color: var(--pb-text);
  font-size: 13px;
  text-decoration: none;
}

a.pb-chip:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

/* ---------------------------------------------------------------------------
 * Каркас
 * ------------------------------------------------------------------------- */

.pb-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

.pb-panel {
  background: var(--pb-card);
  border: 1px solid var(--pb-line);
  border-radius: var(--pb-radius);
  padding: 20px;
}

.pb-panel__title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pb-panel__hint {
  margin: 0 0 16px;
  color: var(--pb-muted);
  font-size: 14px;
}

.pb-panel__title + .pb-list,
.pb-panel__title + .pb-masters {
  margin-top: 14px;
}

.pb-progress {
  margin: 4px 4px 12px;
}

.pb-progress__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 13px;
}

.pb-progress__label {
  font-weight: 600;
}

.pb-progress__count {
  color: var(--pb-muted);
}

.pb-progress__bar {
  height: 4px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.pb-progress__fill {
  height: 100%;
  border-radius: 4px;
  background: var(--brand);
  transition: width 0.3s ease;
}

.pb-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -4px 0 10px -6px;
  padding: 6px;
  border: 0;
  background: none;
  color: var(--pb-muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
}

.pb-back:hover {
  color: var(--pb-text);
}

/* Основная кнопка */
.pb-btn {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 15px 18px;
  border: 0;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.pb-btn:hover {
  background: var(--brand-strong);
}

.pb-btn:active {
  transform: scale(0.99);
}

.pb-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.pb-btn--ghost {
  margin-top: 10px;
  background: transparent;
  color: var(--pb-text);
  border: 1px solid var(--pb-line);
}

.pb-btn--ghost:hover {
  background: var(--pb-bg);
}

.pb-link {
  display: block;
  margin: 10px auto 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-strong);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ---------------------------------------------------------------------------
 * Услуги
 * ------------------------------------------------------------------------- */

.pb-list {
  display: grid;
}

.pb-service {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 4px;
  border: 0;
  border-bottom: 1px solid var(--pb-line);
  background: none;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.pb-service:last-child {
  border-bottom: 0;
}

.pb-service__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pb-service__name {
  font-size: 16px;
  font-weight: 600;
}

.pb-service__text {
  color: var(--pb-muted);
  font-size: 13px;
  line-height: 1.4;
}

.pb-service__meta {
  color: var(--pb-muted);
  font-size: 13px;
}

.pb-price {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.pb-service:hover .pb-price,
.pb-service.is-selected .pb-price {
  background: var(--brand);
  color: #fff;
}

/* ---------------------------------------------------------------------------
 * Мастера
 * ------------------------------------------------------------------------- */

.pb-masters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}

.pb-master {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 12px 14px;
  border: 1.5px solid var(--pb-line);
  border-radius: 16px;
  background: var(--pb-card);
  font: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pb-master:hover,
.pb-master.is-selected {
  border-color: var(--brand);
  background: var(--brand-softer);
}

.pb-avatar {
  width: 56px;
  height: 56px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.pb-master__name {
  font-size: 15px;
  font-weight: 600;
}

.pb-master__position {
  color: var(--pb-muted);
  font-size: 13px;
}

.pb-master__next {
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 600;
}

.pb-master.is-busy .pb-master__next {
  background: var(--pb-bg);
  color: var(--pb-muted);
  font-weight: 500;
}

/* ---------------------------------------------------------------------------
 * Дата и время
 * ------------------------------------------------------------------------- */

.pb-days-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pb-days-head__month {
  font-size: 14px;
  font-weight: 600;
  text-transform: capitalize;
}

.pb-other-date {
  position: relative;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.pb-other-date input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

.pb-days {
  display: flex;
  gap: 8px;
  margin: 0 -20px 16px;
  padding: 2px 20px 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.pb-days::-webkit-scrollbar {
  display: none;
}

.pb-day {
  flex: 0 0 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 0;
  border: 1.5px solid var(--pb-line);
  border-radius: 14px;
  background: var(--pb-card);
  font: inherit;
  color: inherit;
  cursor: pointer;
  scroll-snap-align: start;
}

.pb-day__week {
  color: var(--pb-muted);
  font-size: 12px;
  text-transform: lowercase;
}

.pb-day__num {
  font-size: 17px;
  font-weight: 700;
}

.pb-day:hover {
  border-color: var(--brand-border);
}

.pb-day.is-selected {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.pb-day.is-selected .pb-day__week {
  color: rgba(255, 255, 255, 0.85);
}

.pb-day.is-off {
  opacity: 0.4;
  cursor: default;
  background: var(--pb-bg);
}

.pb-day.is-off:hover {
  border-color: var(--pb-line);
}

.pb-slot-group + .pb-slot-group {
  margin-top: 14px;
}

.pb-slot-group__title {
  margin: 0 0 8px;
  color: var(--pb-muted);
  font-size: 13px;
}

.pb-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
}

.pb-slot {
  padding: 11px 0;
  border: 1.5px solid var(--pb-line);
  border-radius: 12px;
  background: var(--pb-card);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pb-slot:hover {
  border-color: var(--brand);
  color: var(--brand-strong);
}

.pb-slot.is-selected {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.pb-empty {
  padding: 22px 16px;
  border-radius: 14px;
  background: var(--pb-bg);
  color: var(--pb-muted);
  text-align: center;
  font-size: 14px;
}

/* ---------------------------------------------------------------------------
 * Контакты и подтверждение
 * ------------------------------------------------------------------------- */

.pb-form-grid {
  display: grid;
  gap: 14px;
}

.pb-form-grid .field__input,
.pb-form-grid .field__textarea {
  font-size: 16px; /* без автозума на iPhone */
  border-radius: 12px;
}

.pb-form-grid .field__input:focus,
.pb-form-grid .field__textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.pb-optional {
  color: var(--pb-muted);
  font-weight: 400;
}

.pb-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--pb-muted);
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}

.pb-consent input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand);
  flex-shrink: 0;
}

.pb-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.pb-ticket {
  border-radius: 16px;
  border: 1px solid var(--brand-border);
  overflow: hidden;
  margin-top: 12px;
}

.pb-ticket__when {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 16px 18px;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.pb-ticket__day {
  font-size: 15px;
  font-weight: 600;
}

.pb-ticket__time {
  font-size: 22px;
  font-weight: 700;
}

.pb-ticket__rows {
  padding: 6px 18px;
}

.pb-ticket__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--pb-line);
  font-size: 14px;
}

.pb-ticket__row:last-child {
  border-bottom: 0;
}

.pb-ticket__row span:first-child {
  color: var(--pb-muted);
}

.pb-ticket__row span:last-child {
  font-weight: 600;
  text-align: right;
}

.pb-alert {
  margin-top: 16px;
}

/* Подтверждение номера в Telegram */
.pb-verify {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(42, 171, 238, 0.08);
  border: 1px solid rgba(42, 171, 238, 0.3);
}

.pb-verify__title {
  margin: 0 0 8px;
  font-weight: 600;
}

.pb-verify__steps {
  margin: 0 0 14px;
  padding-left: 20px;
  font-size: 14px;
  color: var(--pb-muted);
  display: grid;
  gap: 4px;
}

.pb-verify__open {
  display: block;
  text-align: center;
  text-decoration: none;
  background: #2aabee;
  border-color: #2aabee;
}

.pb-verify__open:hover {
  background: #229ed9;
  border-color: #229ed9;
}

.pb-verify__wait {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--pb-muted);
}

.pb-verify__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(42, 171, 238, 0.3);
  border-top-color: #2aabee;
  border-radius: 50%;
  animation: pb-spin 0.8s linear infinite;
}

.pb-verify__note {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--pb-muted);
  line-height: 1.5;
}

/* ---------------------------------------------------------------------------
 * Загрузка, ошибка, успех
 * ------------------------------------------------------------------------- */

.pb-loader,
.pb-error-screen {
  text-align: center;
  padding: 48px 20px;
  color: var(--pb-muted);
}

.pb-loader--page {
  padding-top: 30vh;
}

.pb-loader--inline {
  padding: 28px 0;
}

.pb-loader__spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 12px;
  border: 3px solid var(--brand-soft);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: pb-spin 0.8s linear infinite;
}

.pb-loader--inline .pb-loader__spinner {
  margin-bottom: 0;
}

@keyframes pb-spin {
  to {
    transform: rotate(360deg);
  }
}

.pb-error-screen {
  padding-top: 25vh;
}

.pb-error-screen__title {
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--pb-text);
}

.pb-error-screen__text {
  margin: 0;
}

.pb-success {
  text-align: center;
  padding: 28px 20px 20px;
}

.pb-success__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
}

.pb-success__title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
}

.pb-success__status {
  margin: 0 0 18px;
  color: var(--pb-muted);
}

.pb-success__details {
  margin: 0 auto 18px;
  max-width: 420px;
  text-align: left;
  display: grid;
  border: 1px solid var(--pb-line);
  border-radius: 14px;
  padding: 4px 16px;
}

.pb-success__details div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--pb-line);
  font-size: 14px;
}

.pb-success__details div:last-child {
  border-bottom: 0;
}

.pb-success__details dt {
  margin: 0;
  color: var(--pb-muted);
}

.pb-success__details dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.pb-manage-link {
  max-width: 420px;
  margin: 0 auto;
  padding: 16px;
  border-radius: 14px;
  background: var(--brand-softer);
  border: 1px solid var(--brand-border);
  text-align: left;
}

.pb-manage-link__title {
  margin: 0 0 4px;
  font-weight: 600;
}

.pb-manage-link__text {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--pb-muted);
}

.pb-manage-link__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pb-manage-link__actions .btn {
  flex: 1 1 140px;
  text-decoration: none;
  text-align: center;
}

.pb-success .pb-btn--ghost {
  max-width: 420px;
  margin: 12px auto 0;
}

/* Подпись Bookly на тарифе Free */
.pb-powered {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px 32px;
  text-align: center;
  font-size: 13px;
  color: var(--pb-muted);
}

.pb-powered a {
  color: var(--pb-text);
  font-weight: 600;
  text-decoration: none;
}

.pb-powered a:hover {
  color: var(--brand-strong);
}

/* ---------------------------------------------------------------------------
 * «Моя запись» (/b/<token>)
 * ------------------------------------------------------------------------- */

.pb-hero {
  margin: 8px 4px 16px;
}

.pb-hero__eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.pb-hero__title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

.pb-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--pb-muted);
  font-size: 14px;
}

.pb-summary {
  display: grid;
  border: 1px solid var(--pb-line);
  border-radius: 14px;
  padding: 4px 16px;
}

.pb-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--pb-line);
  font-size: 14px;
}

.pb-summary__row:last-child {
  border-bottom: 0;
}

.pb-summary__label {
  color: var(--pb-muted);
}

.pb-panel__actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.pb-date-input {
  max-width: 260px;
  margin-bottom: 16px;
}

.pm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.pm-actions .btn {
  flex: 1 1 180px;
  text-decoration: none;
  text-align: center;
}

#pm-panel .btn--primary {
  background: var(--brand);
  border-color: var(--brand);
}

#pm-panel .btn--primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

.pm-hint {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--pb-muted);
}

.pm-notice {
  margin: 0 0 16px;
}

.pm-status {
  font-weight: 600;
}

.pm-status--confirmed {
  color: #15803d;
}

.pm-status--pending {
  color: #b45309;
}

.pm-status--canceled,
.pm-status--no_show {
  color: #b91c1c;
}

.pm-danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.35);
}

#pm-panel .pm-danger-solid {
  background: #dc2626;
  border-color: #dc2626;
}

#pm-panel .pm-danger-solid:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* ---------------------------------------------------------------------------
 * Телефон
 * ------------------------------------------------------------------------- */

@media (max-width: 560px) {
  .pb-cover__band {
    height: 96px;
  }

  .pb-cover__inner {
    padding: 0 16px 16px;
  }

  .pb-logo {
    width: 68px;
    height: 68px;
    margin-top: -34px;
    font-size: 26px;
    border-radius: 20px;
  }

  .pb-cover__title {
    font-size: 23px;
  }

  .pb-main {
    padding: 12px 10px 32px;
  }

  .pb-panel {
    padding: 18px 16px;
    border-radius: 16px;
  }

  .pb-days {
    margin: 0 -16px 16px;
    padding: 2px 16px 6px;
  }

  .pb-masters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pb-panel__actions {
    flex-direction: column-reverse;
  }
}

/* Быстрая запись: «Любой мастер», нажатие на ближайшее время */
.pb-master--any {
  border-style: dashed;
  border-color: var(--brand-border);
}

.pb-master--any .pb-avatar {
  background: var(--brand);
  color: #fff;
}

.pb-master__next[data-action] {
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.pb-master__next[data-action]:hover {
  background: var(--brand);
  color: #fff;
}

.pb-link--left {
  margin: -4px 0 0;
  justify-self: start;
  font-size: 14px;
}

.pb-consent-note {
  margin: 10px 0 0;
  color: var(--pb-muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.pb-ticket--compact {
  margin: 4px 0 18px;
}

.pb-ticket--compact .pb-ticket__when {
  padding: 12px 16px;
}

.pb-ticket--compact .pb-ticket__time {
  font-size: 19px;
}

.pb-ticket--compact .pb-ticket__rows {
  padding: 2px 16px;
}

/* ========== Язык: РУС | ҚАЗ ========== */

.pb-lang {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pb-lang button {
  min-width: 44px;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #52525b;
  cursor: pointer;
}

.pb-lang button.is-active {
  background: var(--brand, #534ab7);
  color: #fff;
}

/* ===========================================================================
 * Профиль салона: фото, «открыто», контакты, часы, «Наши работы», маршрут
 * ========================================================================= */

.pb-cover__band.has-photo {
  height: 180px;
  background-color: var(--brand);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.pb-logo.has-photo {
  overflow: hidden;
  padding: 0;
  background: var(--pb-card);
}

.pb-logo img,
.pb-avatar img,
.pb-service__photo img,
.pb-works__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pb-chip--status {
  color: var(--pb-muted);
}

.pb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a1a1aa;
}

.pb-chip--status.is-open {
  color: #166534;
  background: #ecfdf3;
}

.pb-chip--status.is-open .pb-dot {
  background: #22c55e;
}

.pb-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pb-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--pb-line);
  border-radius: 12px;
  background: var(--pb-card);
  color: var(--pb-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.pb-contact:hover {
  border-color: var(--brand-border);
  background: var(--brand-softer);
  color: var(--brand-strong);
}

.pb-contact svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Категории услуг */
.pb-tabs {
  display: flex;
  gap: 6px;
  margin: 4px -4px 8px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.pb-tabs::-webkit-scrollbar {
  display: none;
}

.pb-tab {
  flex-shrink: 0;
  padding: 8px 14px;
  border: 1px solid var(--pb-line);
  border-radius: 999px;
  background: var(--pb-card);
  color: var(--pb-text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.pb-tab.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.pb-group-title {
  margin: 18px 0 2px;
  color: var(--pb-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pb-service__photo {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--pb-bg);
}

.pb-service__body {
  flex: 1;
}

.pb-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff4e5;
  color: #9a5b00;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 2px;
}

.pb-avatar.has-photo {
  overflow: hidden;
  background: var(--pb-bg);
}

/* Боковой блок: работы, часы, маршрут */
.pb-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 24px;
}

.pb-info__card {
  padding: 18px 20px;
  border: 1px solid var(--pb-line);
  border-radius: var(--pb-radius);
  background: var(--pb-card);
}

.pb-info__title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.pb-info__text {
  margin: 0 0 12px;
  color: var(--pb-muted);
  font-size: 14px;
  line-height: 1.5;
}

.pb-info__route {
  display: block;
  text-align: center;
  text-decoration: none;
}

.pb-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.pb-works__item {
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--pb-bg);
  cursor: zoom-in;
}

.pb-hours {
  margin: 0;
}

.pb-hours__row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--pb-line);
  font-size: 14px;
}

.pb-hours__row:last-child {
  border-bottom: 0;
}

.pb-hours__row dt {
  color: var(--pb-muted);
}

.pb-hours__row dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.pb-hours__row.is-today dt,
.pb-hours__row.is-today dd {
  color: var(--brand-strong);
  font-weight: 700;
}

/* Фото на весь экран */
.pb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 16px 24px;
  background: rgba(0, 0, 0, 0.88);
}

.pb-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  object-fit: contain;
}

.pb-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

/* Компьютер: запись слева, салон справа */
@media (min-width: 980px) {
  .pb-cover__inner {
    max-width: 1004px;
  }

  .pb-body {
    display: grid;
    grid-template-columns: minmax(0, 640px) 340px;
    justify-content: center;
    align-items: start;
    gap: 24px;
    padding: 16px 16px 40px;
  }

  .pb-body .pb-main {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .pb-info {
    position: sticky;
    top: 16px;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .pb-cover__band.has-photo {
    height: 240px;
  }
}

/* ===========================================================================
 * Предоплата Kaspi
 * ========================================================================= */

.pb-prepay-tag {
  color: #9a5b00;
  font-weight: 600;
}

.pb-prepay__amount {
  margin: 4px 0 16px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-strong);
}

.pb-prepay__card,
.pb-prepay__note {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--pb-line);
  border-radius: 16px;
  background: var(--pb-bg);
}

.pb-prepay__label {
  margin: 0 0 4px;
  color: var(--pb-muted);
  font-size: 13px;
  font-weight: 600;
}

.pb-prepay__phone {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pb-prepay__name {
  margin: 2px 0 0;
  font-size: 15px;
}

.pb-prepay__hint {
  margin: 10px 0 0;
  color: var(--pb-muted);
  font-size: 13px;
}

.pb-prepay__note p:last-child {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.pb-prepay__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pb-prepay__actions .pb-btn {
  flex: 1 1 160px;
  width: auto;
  margin: 0;
  text-align: center;
  text-decoration: none;
}

.pb-prepay__warning {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #f5d08a;
  border-radius: 16px;
  background: #fff8e6;
  color: #5c3b00;
  font-size: 14px;
  line-height: 1.5;
}

.pb-prepay__warning p {
  margin: 0;
}

.pb-prepay__warning-title {
  margin-bottom: 4px !important;
  font-size: 16px;
  font-weight: 800;
}

.pb-prepay__timer {
  margin-top: 8px !important;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pb-prepay__links {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--pb-line);
}

.pb-prepay__fallback {
  margin: 0;
  color: var(--pb-muted);
  font-size: 13px;
  line-height: 1.5;
}

.pb-prepay__result {
  padding: 8px 0;
  text-align: center;
}

.pb-prepay__result-text {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.pb-prepay__result--paid .pb-prepay__result-text {
  color: #166534;
}

#pm-prepay {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--pb-line);
}

.pb-consent-note a {
  color: inherit;
  text-decoration: underline;
}
