/* Запись в шоурум — /showroom. Сетка и типографика как у страницы сертификата:
   две колонки, капс-заголовок, подписи «[ … ]», квадратные чёрно-белые плитки. */

.showroom-page-body { background: #fff; }

.showroom-page {
  padding-top: 52px;
  background: #fff;
}

.showroom-page__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  max-width: var(--page-max-w);
  margin: 0 auto;
  align-items: start;
}

.showroom-page__media {
  position: sticky;
  top: 52px;
  padding: 24px 28px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sr-photo {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: calc(100vh - 140px);
  overflow: hidden;
  background: #ededed;
}
.sr-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sr-photo img[hidden] { display: none; }
.sr-photo__mark {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: clamp(64px, 9vw, 140px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0a0a0a;
}
.sr-photo--empty .sr-photo__mark { display: flex; }

.showroom-page__content {
  padding: 32px 48px 64px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.showroom-page__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.showroom-page__desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: #777;
  white-space: pre-line;
}

.sr-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: #0a0a0a;
}
.sr-facts li { display: inline-flex; align-items: center; gap: 8px; }
.sr-facts svg { flex-shrink: 0; color: #0a0a0a; }
.sr-facts a { color: inherit; text-decoration: none; border-bottom: 1px solid #c8c8c8; transition: border-color 0.15s; }
.sr-facts a:hover { border-color: #0a0a0a; }

.sr-state { display: flex; flex-direction: column; gap: 22px; margin-top: 8px; }
.sr-state[hidden] { display: none; }

.sr-block { display: flex; flex-direction: column; gap: 12px; }
.sr-block__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ── Лента дней ── */
.sr-arrows { display: flex; gap: 6px; }
.sr-arrow {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e3e3e3;
  background: #fff;
  color: #0a0a0a;
  cursor: pointer;
  transition: border-color 0.15s, opacity 0.15s;
}
.sr-arrow:hover:not(:disabled) { border-color: #0a0a0a; }
.sr-arrow:disabled { opacity: 0.3; cursor: default; }

.sr-days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 1px;
}
.sr-days::-webkit-scrollbar { display: none; }

.sr-day {
  flex: 0 0 64px;
  height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #e3e3e3;
  background: #fff;
  color: #0a0a0a;
  font-family: inherit;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.sr-day:hover:not(:disabled) { border-color: #0a0a0a; }
.sr-day__num { font-size: 18px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.sr-day__wd { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: #777; }
.sr-day--weekend .sr-day__wd { color: #ff1f71; }
.sr-day[aria-selected="true"] { background: #0a0a0a; border-color: #0a0a0a; color: #fff; }
.sr-day[aria-selected="true"] .sr-day__wd { color: #fff; }
.sr-day:disabled { cursor: default; color: #c8c8c8; background: #fafafa; }
.sr-day:disabled .sr-day__wd { color: #c8c8c8; }
.sr-day:disabled .sr-day__num { text-decoration: line-through; }

/* Разделитель месяца внутри ленты */
.sr-month-sep {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 4px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #777;
  scroll-snap-align: start;
}

/* ── Время ── */
.sr-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
}
.sr-time {
  height: 44px;
  border: 1px solid #e3e3e3;
  background: #fff;
  color: #0a0a0a;
  font-family: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.sr-time:hover { border-color: #0a0a0a; }
.sr-time[aria-selected="true"] { background: #0a0a0a; border-color: #0a0a0a; color: #fff; }
.sr-hint { margin: 0; font-size: 12px; color: #777; line-height: 1.5; }
.sr-hint--warn { color: #ff1f71; }

/* ── Форма ── */
.sr-form { display: flex; flex-direction: column; gap: 18px; padding-top: 22px; border-top: 1px solid #ededed; }
.sr-form[hidden] { display: none; }

.sr-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.sr-summary__when { margin: 4px 0 0; font-size: 16px; font-weight: 500; letter-spacing: 0.02em; }
.sr-summary__len { margin: 2px 0 0; font-size: 12px; color: #777; }

.sr-link {
  padding: 0;
  border: none;
  border-bottom: 1px solid #0a0a0a;
  background: none;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #0a0a0a;
  cursor: pointer;
}
.sr-link:hover { opacity: 0.6; }
.sr-link--muted { align-self: flex-start; color: #777; border-color: #c8c8c8; }

.sr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.sr-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sr-field--full { grid-column: 1 / -1; }
.sr-label { font-size: 11px; letter-spacing: 0.04em; color: #777; }
.sr-label__req { color: #ff2c4d; margin-left: 2px; }

.sr-input {
  height: 48px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0 14px;
  border: 1px solid #e3e3e3;
  border-radius: 2px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: #000;
  outline: none;
  transition: border-color 0.15s;
}
.sr-input::placeholder { color: #bdbdbd; }
.sr-input:focus { border-color: #000; }
.sr-input--area { height: auto; min-height: 88px; padding: 12px 14px; line-height: 1.45; resize: vertical; }
.sr-input--invalid, .sr-input--invalid:focus { border-color: #ff2c4d; }

.sr-phone { position: relative; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; }
.sr-phone__flag {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid #e3e3e3;
  border-radius: 2px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: #000;
  cursor: pointer;
}
.sr-phone__flag:hover { border-color: #bdbdbd; }
.sr-phone__flag span { display: inline-block; line-height: 0; }
.sr-phone__menu {
  position: absolute;
  top: 52px;
  left: 0;
  z-index: 10;
  display: none;
  width: 240px;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #e3e3e3;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.sr-phone__menu[data-open="true"] { display: block; }
.sr-phone__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: #000;
  text-align: left;
  cursor: pointer;
}
.sr-phone__opt:hover { background: #f5f5f5; }
.sr-phone__opt-name { flex: 1; }
.sr-phone__opt-code { color: #777; }

.sr-checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 11px; line-height: 1.4; color: #777; cursor: pointer; }
.sr-checkbox a { color: #000; text-decoration: underline; }
.sr-checkbox input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin: 1px 0 0;
  border: 1px solid #c4c4c4;
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
}
.sr-checkbox input:checked { background: #000; border-color: #000; }
.sr-checkbox input:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.sr-checkbox--invalid input { border-color: #ff2c4d; }

.sr-error { font-size: 12px; line-height: 1.5; color: #ff2c4d; white-space: pre-line; }
.sr-error[hidden] { display: none; }

.sr-submit { flex: none; width: 100%; }
.sr-submit:disabled { opacity: 0.5; cursor: default; }

/* ── Готово / отмена ── */
.sr-done { padding: 24px; border: 1px solid #0a0a0a; }
.sr-done__when { margin: 0; font-size: 20px; font-weight: 500; line-height: 1.35; letter-spacing: 0.01em; }
.sr-done__text { margin: 0; font-size: 12px; line-height: 1.6; color: #666; white-space: pre-line; }
.sr-done__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.sr-btn {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid #0a0a0a;
  background: #0a0a0a;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.sr-btn:hover { opacity: 0.85; }
.sr-btn:disabled { opacity: 0.5; cursor: default; }
.sr-btn--ghost { background: #fff; color: #0a0a0a; }
.sr-btn--ghost:hover { opacity: 1; background: #0a0a0a; color: #fff; }

.sr-note { padding: 20px 22px; background: #f5f5f5; gap: 6px; }
.sr-note__title { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.sr-note__text { margin: 0; font-size: 12px; line-height: 1.55; color: #666; }
.sr-note__text a { color: #0a0a0a; }

/* Скелетон, пока грузится расписание */
.sr-skeleton { background: linear-gradient(90deg, #f3f3f3 0%, #fafafa 50%, #f3f3f3 100%); background-size: 200% 100%; animation: srShimmer 1.2s linear infinite; }
.sr-skeleton--days { height: 72px; }
.sr-skeleton--times { height: 96px; }
@keyframes srShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── Мои записи и перенос ── */
.sr-mine { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border: 1px solid #0a0a0a; }
.sr-mine[hidden] { display: none; }
.sr-mine__list { display: flex; flex-direction: column; }
.sr-mine__item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid #ededed; }
.sr-mine__item:first-child { border-top: none; padding-top: 4px; }
.sr-mine__when { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 14px; }
.sr-mine__when b { font-weight: 500; }
.sr-mine__when span { font-size: 12px; color: #777; overflow-wrap: anywhere; }
.sr-mine__when .sr-mine__note { color: #ff1f71; }
.sr-mine__actions { display: flex; gap: 16px; flex-shrink: 0; }

.sr-resched { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; background: #f5f5f5; font-size: 13px; }
.sr-resched[hidden] { display: none; }
.sr-resched p { margin: 0; line-height: 1.5; }
.sr-resched b { font-weight: 600; }

.sr-confirm { flex-basis: 100%; font-size: 13px; font-weight: 500; }
.sr-manage-back { align-self: center; margin-left: 4px; }

@media (max-width: 900px) {
  .showroom-page__inner { grid-template-columns: 1fr; }
  .showroom-page__media { position: static; padding: 16px 16px 0; }
  .sr-photo { aspect-ratio: 16 / 10; max-height: none; }
  /* Без фото на телефоне заглушка только отодвигает календарь — прячем блок целиком */
  .showroom-page__media:has(.sr-photo--empty) { display: none; }
  .showroom-page__content { padding: 20px 16px 48px; }
  .sr-arrows { display: none; }
  .sr-days { margin: 0 -16px; padding: 1px 16px; scroll-padding: 0 16px; }
  .sr-grid { grid-template-columns: 1fr; }
  .sr-done { padding: 20px 16px; }
  .sr-mine { padding: 16px; }
  .sr-mine__item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .sr-resched { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .sr-days { scroll-behavior: auto; }
  .sr-skeleton { animation: none; }
}
