/* ===== LOCATION MODALS ===== */
.location-modal {
  position: fixed;
  inset: 0;
  background: rgba(42, 28, 24, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  padding: 20px;
}

.location-modal.active {
  opacity: 1;
  visibility: visible;
}

.location-modal-content {
  --metro: var(--c-brand); /* fallback */
  background: var(--c-bg);
  border-radius: 20px;
  border-top: 3px solid var(--metro);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--c-brand-rgb), 0.25) transparent;
}

.location-modal-content::-webkit-scrollbar { width: 4px; }
.location-modal-content::-webkit-scrollbar-track { background: transparent; }
.location-modal-content::-webkit-scrollbar-thumb { background: rgba(var(--c-brand-rgb), 0.25); border-radius: 4px; }

.location-modal.active .location-modal-content {
  transform: translateY(0) scale(1);
}

/* Кнопка закрытия */
.location-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: var(--tap);
  height: var(--tap);
  border: 1px solid rgba(var(--c-brand-rgb), 0.15);
  background: rgba(250, 248, 245, 0.9);
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(var(--c-brand-deep-rgb), 0.6);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.location-modal-close:hover {
  border-color: rgba(var(--c-brand-rgb), 0.4);
  color: var(--c-brand);
  background: var(--c-white);
}

/* Карта */
.location-modal-map {
  width: 100%;
  line-height: 0;
  overflow: hidden;
  border-radius: 17px 17px 0 0;
}

.location-modal-map iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: 0;
}

/* Контентная зона */
.location-modal-info {
  padding: 0;
}

/* Шапка */
.location-modal-header {
  padding: 28px 32px 20px 32px;
  border-bottom: 1px solid rgba(var(--c-brand-rgb), 0.07);
}

.location-modal-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 300;
  color: var(--c-brand);
  margin: 0 0 10px 0;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.location-modal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.location-modal-address {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--c-taupe);
  letter-spacing: 0.02em;
}

.location-modal-metro-tag {
  font-family: var(--font-body);
  font-size: 11px;
  color: color-mix(in srgb, var(--metro) 70%, var(--c-brand) 30%);
  background: color-mix(in srgb, var(--metro) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--metro) 18%, transparent);
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* Секции */
.location-modal-section {
  padding: 20px 32px;
  border-bottom: 1px solid rgba(var(--c-brand-rgb), 0.06);
}

.location-modal-section-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  font-style: italic;
  color: var(--c-brand);
  margin: 0 0 10px 0;
  letter-spacing: 0.01em;
}

.location-modal-section p {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--c-mocha);
  line-height: 1.7;
  margin: 0;
}

/* Преимущества */
.location-modal-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}

.location-modal-benefits li {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--c-mocha);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.location-modal-benefits li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 5px;
  height: 5px;
  background: color-mix(in srgb, var(--metro) 65%, var(--c-taupe) 35%);
  border-radius: 50%;
}

/* CTA-блок */
.location-modal-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 32px 28px 32px;
}

.location-modal-cta-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--c-brand-deep);
  text-decoration: none;
  flex: 1;
  min-height: var(--tap);
  transition: color 0.2s;
}

.location-modal-cta-phone svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--c-mauve);
}

.location-modal-cta-phone:hover {
  color: var(--c-accent);
}

.location-modal-cta-btn {
  padding: 11px 24px;
  background: var(--c-brand);
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
}

.location-modal-cta-btn:hover {
  background: var(--c-brand-wine);
}

/* Адаптивность */
@media (max-width: 768px) {
  .location-modal-content {
    max-height: 88vh;
  }

  .location-modal-map iframe {
    height: 220px;
  }

  .location-modal-header {
    padding: 24px 24px 18px 24px;
  }

  .location-modal-section {
    padding: 18px 24px;
  }

  .location-modal-cta {
    padding: 18px 24px 24px 24px;
  }

  .location-modal-benefits {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 479px) {
  .location-modal {
    padding: 12px;
  }

  .location-modal-map iframe {
    height: 190px;
  }

  .location-modal-title {
    font-size: 24px;
  }

  .location-modal-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .location-modal-cta-btn {
    text-align: center;
  }
}

/* ===== FLOATING SOCIAL BLOCK ===== */
.social-float {
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  z-index: 900;
  transition: background-color .25s ease, backdrop-filter .25s ease, opacity .25s ease, box-shadow .25s ease;

  /* Начальное положение - полоса внизу на всю ширину */
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 20px 24px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background: rgba(var(--c-white-rgb), 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(var(--c-white-rgb), 0.3);
  border-radius: 48px 48px 0 0;
}

/* Состояние при скролле - справа */
.social-float.scrolled {
  bottom: 50%;
  left: auto;
  right: 24px;
  width: auto;
  transform: translateY(50%);
  flex-direction: column;
  padding: 16px 12px;
  border-radius: 30px;
  border: 1px solid rgba(var(--c-white-rgb), 0.25);
  border-top: 1px solid rgba(var(--c-white-rgb), 0.25);
}

.social-float-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--c-brand);
  border-radius: 50%;
  background: rgba(var(--c-white-rgb), 0.35);
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-float-link svg {
  width: 22px;
  height: 22px;
}

.social-float-link:hover {
  background: rgba(var(--c-white-rgb), 0.7);
  transform: scale(1.1);
  color: var(--c-accent);
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  .social-float {
    gap: 12px;
    padding: 20px 24px;
  }

  .social-float.scrolled {
    right: 16px;
    padding: 12px 10px;
  }

  .social-float-link {
    width: var(--tap);
    height: var(--tap);
  }

  .social-float-link svg {
    width: 20px;
    height: 20px;
  }
}

.location-detail-phone {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  color: var(--c-brand-deep);
  text-decoration: none;
  border-top: 1px solid rgba(var(--c-brand-rgb), 0.06);
  transition: background 0.2s;
}

.location-detail-phone:hover,
.location-detail-phone:active {
  background: rgba(var(--c-brand-rgb), 0.03);
}

.location-detail-phone-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--c-mauve);
}

.location-detail-phone-text {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--c-brand-deep);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* на очень узких — чтобы не ломало */
@media (max-width: 420px){
  .location-detail-phone{
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}


/* ===== ФОРМА ЗАПИСИ ===== */
.booking-form-wrap {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(var(--c-brand-rgb), 0.08);
}

.booking-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.booking-form-header {
  text-align: center;
  margin-bottom: 4px;
}

.booking-form-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 28px;
  color: var(--c-brand);
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}

.booking-form-subtitle {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(var(--c-brand-rgb), 0.55);
  margin: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.booking-form-branch-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: max-content;
  margin: 10px auto 8px;
  padding: 6px 14px;
  background: rgba(var(--c-mauve-rgb), 0.08);
  border: 1px solid rgba(var(--c-mauve-rgb), 0.22);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(var(--c-brand-rgb), 0.75);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.booking-form-branch-chip-pin {
  font-size: 12px;
  line-height: 1;
}

.booking-form-branch-chip-name {
  font-weight: 500;
  color: var(--c-brand);
}

.booking-form-branch-chip-sep {
  color: rgba(var(--c-brand-rgb), 0.3);
}

.booking-form-branch-chip-metro {
  color: var(--c-mauve);
}

@media (max-width: 479px) {
  .booking-form-branch-chip {
    margin: 8px auto 6px;
    padding: 5px 12px;
    font-size: 10px;
  }
  .booking-form-branch-chip-pin {
    font-size: 11px;
  }
}

.booking-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 540px) {
  .booking-form-grid {
    grid-template-columns: 1fr;
  }
}

.booking-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.booking-form-field-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: rgba(var(--c-brand-rgb), 0.6);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.booking-form input[type="text"],
.booking-form input[type="tel"],
.booking-form textarea,
.booking-form-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--c-bg);
  border: 1px solid rgba(var(--c-brand-rgb), 0.15);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--c-brand);
  transition: border-color 0.18s ease, background 0.18s ease;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.booking-form input[type="text"]:focus,
.booking-form input[type="tel"]:focus,
.booking-form textarea:focus,
.booking-form-select:focus {
  outline: none;
  border-color: var(--c-brand);
  background: var(--c-white);
}

.booking-form textarea {
  resize: vertical;
  min-height: 56px;
  font-family: var(--font-body);
}

.booking-form-select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%233E1F20' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 36px;
  cursor: pointer;
}

.booking-form-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.booking-form-section-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: rgba(var(--c-brand-rgb), 0.6);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.booking-form-section-hint {
  font-weight: 400;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.02em;
  color: rgba(var(--c-brand-rgb), 0.45);
  margin-left: 6px;
}

.booking-form-field-hint {
  font-family: var(--font-body);
  font-size: 11px;
  font-style: italic;
  color: rgba(var(--c-brand-rgb), 0.55);
  letter-spacing: 0.02em;
  margin-top: -2px;
}

.booking-form-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.booking-pill {
  flex: 1 1 auto;
  min-width: max-content;
  cursor: pointer;
  user-select: none;
}

.booking-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.booking-pill-text {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 6px 18px;
  background: var(--c-bg);
  border: 1px solid rgba(var(--c-brand-rgb), 0.15);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--c-brand);
  text-align: center;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.booking-pill input:checked + .booking-pill-text {
  background: var(--c-brand);
  border-color: var(--c-brand);
  color: var(--c-bg);
}

.booking-pill:hover .booking-pill-text {
  border-color: rgba(var(--c-brand-rgb), 0.4);
}

.booking-pill input:checked + .booking-pill-text {
  border-color: var(--c-brand);
}

.booking-form-call-time[hidden],
.booking-form-telegram-field[hidden] {
  display: none;
}

[data-phone-tg-hint][hidden] {
  display: none;
}

.booking-form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(var(--c-brand-rgb), 0.7);
  line-height: 1.5;
}

.booking-form-consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--c-brand);
  cursor: pointer;
}

.booking-form-consent a {
  color: var(--c-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.booking-form-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 24px;
  background: var(--c-brand);
  color: var(--c-bg);
  border: 1px solid var(--c-brand);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.booking-form-submit:hover:not(:disabled) {
  transform: translateY(-1px);
}

.booking-form-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.booking-form-submit-spinner {
  display: none;
  width: 16px;
  height: 16px;
  margin-left: 10px;
  border: 2px solid rgba(250, 248, 245, 0.3);
  border-top-color: var(--c-bg);
  border-radius: 50%;
  animation: booking-spin 0.7s linear infinite;
}

.booking-form-submit.is-loading .booking-form-submit-spinner {
  display: inline-block;
}

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

.booking-form-error {
  margin: 0;
  padding: 10px 14px;
  background: rgba(192, 57, 43, 0.06);
  border: 1px solid rgba(192, 57, 43, 0.25);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 12px;
  color: #c0392b;
  text-align: center;
}

.booking-form-error[hidden] {
  display: none;
}

.booking-form-error-fallback {
  margin-top: 8px;
  padding: 12px 14px;
  background: rgba(var(--c-brand-rgb), 0.04);
  border: 1px solid rgba(var(--c-brand-rgb), 0.12);
  border-radius: 10px;
}

.booking-form-error-fallback[hidden] {
  display: none;
}

.booking-form-error-fallback-text {
  margin: 0 0 10px;
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(var(--c-brand-rgb), 0.7);
  letter-spacing: 0.02em;
  text-align: center;
}

.booking-form-error-fallback-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.booking-form-error-fallback-links .booking-contact-btn {
  flex: 1 1 auto;
  min-width: 100px;
  padding: 9px 14px;
  font-size: 12px;
}

/* Success state */
.booking-form-success {
  text-align: center;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.booking-form-success[hidden] {
  display: none;
}

.booking-form-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(123, 166, 136, 0.18);
  color: #5a8268;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 4px;
}

.booking-form-success.is-warning .booking-form-success-icon {
  background: rgba(201, 148, 82, 0.2);
  color: #b5753b;
}

.booking-form-success.is-warning .booking-form-success-title {
  color: #8a5524;
}

.booking-form-success-fallback {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 360px;
  margin: 6px auto 0;
}

.booking-form-success-fallback[hidden] {
  display: none;
}

.booking-form-success-fallback .booking-contact-btn {
  flex: 1 1 auto;
  min-width: 100px;
  padding: 10px 14px;
  font-size: 12px;
}

.booking-form-success-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 24px;
  font-weight: 500;
  color: var(--c-brand);
  margin: 0;
}

.booking-form-success-text {
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(var(--c-brand-rgb), 0.65);
  line-height: 1.5;
  margin: 0;
  max-width: 320px;
}

.booking-form-reset {
  margin-top: 8px;
  padding: 10px 22px;
  background: transparent;
  color: var(--c-brand);
  border: 1px solid rgba(var(--c-brand-rgb), 0.3);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s ease;
}

.booking-form-reset:hover {
  background: var(--c-brand);
  color: var(--c-bg);
}

/* Общая модалка бронирования */
.booking-modal-content--booking {
  max-width: 560px;
}

.booking-modal-subtitle {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(var(--c-brand-rgb), 0.55);
  margin: 6px 0 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.booking-modal-content--booking .booking-form-wrap {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* ===== WhatsApp: выбор филиала (поповер над кнопкой в соцблоке) ===== */
.social-wa {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.social-wa-btn {
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.social-wa-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  min-width: 178px;
  padding: 10px;
  background: rgba(250, 248, 245, 0.98);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(var(--c-brand-rgb), 0.12);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(var(--c-brand-rgb), 0.18);
  animation: social-wa-rise 0.2s ease;
}
@keyframes social-wa-rise {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .social-wa-popover { animation: none; }
}
/* каретка вниз к кнопке */
.social-wa-popover::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: rgba(250, 248, 245, 0.98);
}
.social-wa-popover-title {
  margin: 2px 8px 8px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(var(--c-brand-deep-rgb), 0.55);
}
.social-wa-option {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 12px;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.18s ease;
}
.social-wa-option:hover {
  background: rgba(var(--c-mauve-rgb), 0.12);
}
.social-wa-option-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  line-height: 1.1;
  color: var(--c-brand);
}
.social-wa-option-metro {
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(var(--c-brand-deep-rgb), 0.60);
}

/* Десктопная правая пилюля (.scrolled): поповер уходит влево от кнопки */
.social-float.scrolled .social-wa-popover {
  bottom: 50%;
  left: auto;
  right: calc(100% + 12px);
  transform: translateY(50%);
  animation: none;
}
.social-float.scrolled .social-wa-popover::after {
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border: 7px solid transparent;
  border-left-color: rgba(250, 248, 245, 0.98);
}
