/* pages/seo-common.css */

/* ========== Apple HIG Design System ========== */
:root {
  /* Палитра iOS */
  --ios-bg: #F2F2F7;
  --ios-card: #FFFFFF;
  --ios-accent: #0A84FF;  /* iOS Blue */
  --ios-accent-press: #0066CC;
  --ios-success: #34C759;
  --ios-danger: #FF3B30;
  --ios-muted: rgba(60,60,67,0.6);
  --ios-label: rgba(0,0,0,0.85);
  --ios-hairline: rgba(60,60,67,0.29); /* «волосная» граница */

  /* Радиусы/тени/шаги */
  --r-card: 14px; 
  --r-ctl: 12px; 
  --r-pill: 999px;
  --shadow-soft: 0 8px 30px rgba(0,0,0,.06);
  --shadow-hover: 0 12px 40px rgba(0,0,0,.08);
  --pad-ctl: 10px 14px;

  /* Совместимость со старыми переменными */
  --seo-gap: 16px;
  --seo-radius: var(--r-card);
  --seo-border: var(--ios-hairline);
  --seo-bg: var(--ios-card);
  --seo-muted: var(--ios-muted);
  --seo-primary: var(--ios-accent);
  --seo-accent: var(--ios-accent);
  --seo-star: #f4b000;
}

/* ========== База страницы ========== */
body{ 
  background: var(--ios-bg); 
  color: var(--ios-label); 
  font: 16px/1.45 -apple-system,BlinkMacSystemFont,"SF Pro Text",Inter,"Helvetica Neue",Arial,system-ui,sans-serif; 
}
h1,h2,h3{ letter-spacing: -0.01em; }
small, .muted{ color: var(--ios-muted); }

/* Убираем цветной фон у site-content-inner */
.site-content-inner {
  background: transparent !important;
}

.seo-wrap { 
  max-width: 100%;
  padding: 16px;
  box-sizing: border-box;
  background: transparent;
}
.seo-wrap * { box-sizing: inherit; }

.seo-section h2, .entry-title { letter-spacing: -0.01em; }

/* Страховка от наложения флоатов темы */
.content-area::after { content: ""; display: block; clear: both; }

/* ========== Fluid typography ========== */
h1.entry-title { 
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); 
  font-weight: 800;
}
.seo-section h2 { 
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem); 
  font-weight: 700;
}
.seo-card h3 { 
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.15rem); 
  word-break: break-word; 
  overflow-wrap: anywhere;
}

/* ========== Гибкая сетка ========== */
.seo-grid { display: grid; grid-gap: 16px; }
.seo-grid.auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Если где-то остаются старые модификаторы — делаем их гибкими */
.seo-grid.cols-4, .seo-grid.cols-3, .seo-grid.cols-2 { 
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
}

@media (max-width: 1024px) { 
  .seo-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 768px) { 
  .seo-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
@media (max-width: 480px) { 
  .seo-grid { grid-template-columns: 1fr; }
}

/* ========== Cards Apple-стиль ========== */
.seo-card { 
  border: 1px solid var(--ios-hairline); 
  border-radius: var(--r-card); 
  padding: 16px; 
  background: var(--ios-card); 
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s ease, transform 0.12s ease;
}
.seo-card h3 { margin: 0 0 8px; font-size: 1.05rem; letter-spacing: -0.01em; }
.seo-card .meta { color: var(--ios-muted); font-size: 0.9rem; }
.seo-card:hover { 
  box-shadow: var(--shadow-hover); 
  transform: translateY(-1px); 
}
.seo-card:focus-within { 
  outline: 2px solid var(--seo-accent); 
  outline-offset: 2px; 
}
.seo-card h3.icon .dashicons { color: var(--ios-accent); }

/* ========== Единая система кнопок Apple-стиль ========== */
.btn {
  position: relative !important;
  z-index: 0;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 999px;
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
  word-break: keep-all;
  hyphens: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease;
  text-decoration: none;
  font-size: 16px;
  touch-action: manipulation;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: currentColor;
  opacity: 0;
  transition: opacity .2s;
  z-index: -1;
}
.btn:hover::before {
  opacity: .08;
}
.btn .ripple,
.btn::after {
  display: none !important;
}
.btn:active { transform: translateY(1px); }

.btn-primary { 
  background: var(--ios-accent); 
  color: #fff; 
  border: 1px solid var(--ios-accent); 
}
.btn-primary:active { 
  background: var(--ios-accent-press); 
}
.btn-primary .dashicons { color: #fff; }

.btn-ghost { 
  background: #fff; 
  color: var(--ios-label); 
  border: 1px solid var(--ios-hairline); 
}
.btn-ghost .dashicons { color: var(--ios-muted); }

/* На всякий случай: не даём псевдо-слою выходить за карточку */
.branch-card { overflow: hidden; }

/* ========== Кнопки под картой ========== */
.map-actions { 
  display: flex; 
  gap: 8px; 
  align-items: center; 
  flex-wrap: wrap; 
}

.segment { 
  display: inline-flex; 
  border: 1px solid var(--ios-hairline); 
  border-radius: 999px; 
  overflow: hidden; 
  background: #fff; 
}
.segment .seg { 
  padding: 8px 14px; 
  min-height: 40px; 
  cursor: pointer; 
}
.segment .seg.active { 
  background: #E7F0FF; 
  color: #084E9B; 
  border-left: 1px solid #D7E6FF; 
}

/* ========== Иконки Apple-стиль ========== */
.icon .dashicons { 
  color: var(--ios-muted); 
  margin-right: 6px; 
  position: relative; 
  top: 1px; 
}
.btn-primary .dashicons { color: #fff; }

/* ========== Микро-анимации Apple-стиль ========== */
.btn, .seg { 
  transition: background-color 0.2s ease, transform 0.12s ease; 
}
.btn:active, .seg:active { 
  transform: translateY(1px); 
}

/* ========== Доступность ========== */
* {
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}
button, .btn {
  touch-action: manipulation;
}
:focus-visible { 
  outline: 2px solid var(--ios-accent); 
  outline-offset: 2px; 
}

/* ========== Типографика и вертикальный ритм ========== */
.muted { 
  color: rgba(60,60,67,.6); 
}
.row + .row { 
  margin-top: 8px; 
}

/* ========== Сетка карточек одинаковой высоты ========== */
.branches-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); 
  gap: 12px; 
  align-items: stretch; 
}
.branches-grid .branch-card { 
  height: 100%;
  content-visibility: auto;
  contain-intrinsic-size: 480px 360px;
}

.seo-card .meta.badge {
  background: #eef3ff; 
  border-color: #d7e2ff; 
  color: #3b4b69;
  align-self: flex-start;
}

/* ========== Links ========== */
.seo-nav a, .seo-card a { text-decoration: none; color: inherit; }

/* ========== Sections & Layout ========== */
.seo-breadcrumbs { margin-bottom: 12px; }
.seo-section { margin: 24px 0; }
.seo-section h2 { margin-bottom: 12px; font-size: 1.25rem; }
.seo-muted { color: var(--seo-muted); font-size: 0.95rem; }

/* ========== Dashicons helpers ========== */
.icon { display: inline-flex; align-items: center; gap: 6px; }
.icon .dashicons { line-height: 1; font-size: 18px; width: 18px; height: 18px; }

/* ========== Rating stars ========== */
.seo-rating { display: inline-flex; align-items: center; gap: 6px; }
.seo-stars { display: inline-flex; color: var(--seo-star); }
.seo-stars .dashicons { font-size: 18px; width: 18px; height: 18px; }
.seo-rating .seo-score { color: var(--seo-muted); font-size: 0.95rem; }

/* ========== Бейджи-пилюли Apple-стиль ========== */
.badge { 
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
  padding: 6px 10px; 
  border: 1px solid var(--ios-hairline); 
  background: #F6F7FB; 
  border-radius: var(--r-pill); 
  font-size: .85rem; 
  color: var(--ios-label);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.badge:hover { 
  background: #E7F0FF; 
  border-color: #D7E6FF; 
}
button.badge {
  font-family: inherit;
}

.badge-open { 
  background: rgba(52,199,89,.12); 
  border-color: rgba(52,199,89,.35); 
  color: #138000; 
}

.badge-closed { 
  background: #EFF1F4; 
  border-color: #E5E7EB; 
  color: var(--ios-muted); 
}

/* ========== Сегмент-контрол Apple-стиль ========== */
.segment { 
  display: inline-flex; 
  border: 1px solid var(--ios-hairline); 
  border-radius: var(--r-pill); 
  overflow: hidden; 
  background: #fff; 
}

.segment .seg { 
  padding: 8px 14px; 
  min-height: 40px; 
  cursor: pointer; 
  color: var(--ios-label);
  border: none;
  background: transparent;
  font-weight: 500;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.segment .seg:not(:last-child) {
  border-right: 1px solid var(--ios-hairline);
}

.segment .seg:hover {
  background: #F8F9FA;
}

.segment .seg.active { 
  background: #E7F0FF; 
  color: #084E9B; 
}

/* ========== iOS переключатель ========== */
.switch {
  position: relative; 
  display: inline-block; 
  width: 52px; 
  height: 31px;
}
.switch input { 
  opacity: 0; 
  width: 0; 
  height: 0; 
}
.switch span { 
  position: absolute; 
  inset: 0; 
  background: #E9E9EB; 
  border-radius: 31px; 
  transition: .2s; 
  border: 1px solid var(--ios-hairline); 
}
.switch span:before {
  content: ""; 
  position: absolute; 
  width: 27px; 
  height: 27px; 
  left: 2px; 
  top: 2px;
  background: #fff; 
  border-radius: 50%; 
  box-shadow: 0 2px 4px rgba(0,0,0,.12); 
  transition: .2s;
}
.switch input:checked + span { background: var(--ios-accent); }
.switch input:checked + span:before { transform: translateX(21px); }

/* ========== Tabs ========== */
.seo-tabs { 
  display: flex; 
  gap: 8px; 
  border-bottom: 1px solid #eee; 
  margin-bottom: 12px; 
  flex-wrap: wrap; 
}
.seo-tabs a { 
  padding: 8px 12px; 
  border: 1px solid #eee; 
  border-bottom: none; 
  border-radius: 6px 6px 0 0; 
  background: #fafafa; 
  color: #334155;
}
.seo-tabs a.active { 
  background: #fff; 
  border-bottom-color: #fff; 
  color: #111; 
}
.seo-tabs a:focus { 
  outline: 2px solid var(--seo-accent); 
  outline-offset: 2px; 
}
.seo-tab { 
  padding: 12px; 
  border: 1px solid #eee; 
  border-radius: 0 6px 6px 6px; 
  background: #fff; 
}

/* ========== Maps ========== */
.seo-map { 
  width: 100%; 
  min-height: 420px;
  height: 420px; 
  border-radius: var(--seo-radius); 
  overflow: hidden; 
  border: 1px solid #eee; 
}
@media (max-width: 640px){ 
  .seo-map { height: 360px; min-height: 360px; } 
}

/* ========== Navigation ========== */
.seo-nav { 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
  margin: 12px 0; 
}
.seo-nav a, .seo-nav button { 
  background: #f5f7fb; 
  border-color: #e0e6f5; 
  color: #384861;
  padding: 6px 10px; 
  border-radius: 6px; 
  border: 1px solid #e6ecf6; 
}
.seo-nav .badge { 
  background: #f5f7fb; 
  border-color: #e0e6f5; 
  color: #384861; 
}
.seo-nav .badge:hover, .seo-nav a:hover, .seo-nav button:hover { 
  background: #eef3ff; 
  border-color: #d7e2ff; 
}

/* ========== Filters ========== */
.seo-filters { 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
  margin-bottom: 12px; 
  align-items: center;
}
.seo-filters input[type="search"] { 
  flex: 1; 
  min-width: 240px; 
  padding: 8px; 
}
.seo-filters select { 
  padding: 8px; 
}

/* ========== Lists ========== */
.seo-list { 
  display: grid; 
  grid-gap: 12px; 
}
.seo-list .seo-card { 
  display: grid; 
  grid-template-columns: 1fr auto; 
  gap: 8px; 
  align-items: center; 
}
@media (max-width: 560px) { 
  .seo-list .seo-card { 
    grid-template-columns: 1fr; 
  } 
}

/* ========== Price table ========== */
.seo-price { 
  width: 100%; 
  border-collapse: collapse; 
  margin: 8px 0 16px; 
  background: var(--seo-bg); 
}
.seo-price th, .seo-price td { 
  padding: 10px 12px; 
  border: 1px solid var(--seo-border); 
}
.seo-price th { 
  background: #f9fafb; 
  text-align: left; 
  font-weight: 600; 
}
.seo-price tr:hover { 
  background: #fafcff; 
}

/* ========== FAQ accordion ========== */
.faq-list { 
  display: grid; 
  gap: 10px; 
}
.faq-item { 
  border: 1px solid var(--seo-border); 
  border-radius: var(--seo-radius); 
  background: var(--seo-bg); 
  overflow: hidden; 
}
.faq-q { 
  margin: 0; 
  padding: 12px 14px; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  background: #fafafa; 
  user-select: none;
}
.faq-q .dashicons { 
  transition: transform .2s ease; 
}
.faq-item[aria-expanded="true"] .faq-q .dashicons { 
  transform: rotate(90deg); 
}
.faq-a { 
  display: none; 
  padding: 12px 14px; 
  color: #333; 
}
.faq-item[aria-expanded="true"] .faq-a { 
  display: block; 
}

/* ========== Dark mode ========== */
@media (prefers-color-scheme: dark) {
  :root {
    --seo-border: #2b2f36;
    --seo-bg: #0f1115;
    --seo-muted: #9aa3b2;
  }
  .seo-card, .seo-tab { 
    background: #0f1115; 
    border-color: #2b2f36; 
  }
  .seo-section h2, .entry-title { 
    color: #e6ebf2; 
  }
  .seo-price th { 
    background: #111418; 
  }
  .faq-q { 
    background: #111418; 
  }
  .seo-tabs a { 
    background: #111418; 
    border-color: #2b2f36; 
  }
  .seo-tabs a.active { 
    background: #0f1115; 
    border-bottom-color: #0f1115; 
    color: #e6ebf2; 
  }
  .badge, .seo-nav .badge { 
    background: #1a1f26; 
    border-color: #2b2f36; 
    color: #9aa3b2; 
  }
  .seo-nav a, .seo-nav button {
    background: #1a1f26; 
    border-color: #2b2f36; 
    color: #9aa3b2; 
  }
}

/* ========== Apple 2025 Branch Cards ========== */
.branches-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 20px;
  padding: 0;
}

/* Карточка филиала - Apple 2025 стиль */
.branch-card {
  position: relative;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 0; 
  border: none;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.branch-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* Шапка карточки с адресом и статусом */
.branch-card__header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.branch-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px; 
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.branch-card__status--open {
  background: rgba(52, 199, 89, 0.15);
  color: #1D8B3A;
}

.branch-card__status--closed {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.6);
}

.branch-card__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.branch-card__address {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #000000;
  margin: 0;
  word-wrap: break-word;
}

.branch-card__tags {
  display: flex; 
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap; 
}

.branch-card__tag {
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.6);
  letter-spacing: -0.01em;
}

/* Контент карточки */
.branch-card__content {
  padding: 16px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.branch-card__info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.8);
}

.branch-card__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.branch-card__icon .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

.branch-card__info-text {
  flex: 1;
  min-width: 0;
}

.branch-card__info-text a {
  color: #007AFF;
  text-decoration: none;
  font-weight: 500;
}

.branch-card__info-text a:hover {
  text-decoration: underline;
}

/* Футер с действиями */
.branch-card__footer {
  padding: 16px 24px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.branch-card__action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.branch-card__action--primary {
  background: #007AFF;
  color: #FFFFFF;
  /* Убрали grid-column: 1 / -1; чтобы была такого же размера как остальные */
}

.branch-card__action--primary:hover {
  background: #0051D5;
  transform: scale(1.02);
}

.branch-card__action--primary:active {
  transform: scale(0.98);
}

.branch-card__action--secondary {
  background: rgba(0, 0, 0, 0.04);
  color: #000000;
}

.branch-card__action--secondary:hover {
  background: rgba(0, 0, 0, 0.08);
}

.branch-card__action--secondary:active {
  background: rgba(0, 0, 0, 0.12);
}

.branch-card__action--review {
  background: #34C759;
  color: #FFFFFF;
  grid-column: span 2; /* Занимает 2 колонки */
  font-weight: 600;
}

.branch-card__action--review:hover {
  background: #30B350;
  transform: scale(1.02);
}

.branch-card__action--review:active {
  background: #2DA948;
  transform: scale(0.98);
}

.branch-card__action--review .dashicons {
  color: #FFFFFF;
}

.branch-card__action .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

/* Badge для "Главный" */
.branch-card__badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #FFD60A 0%, #FFA500 100%);
  color: #000000;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(255, 214, 10, 0.3);
}

@media (max-width: 640px) {
  .branches-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .branch-card {
    border-radius: 16px;
    min-height: 280px;
  }
  
  .branch-card__header {
    padding: 20px 20px 12px;
  }
  
  .branch-card__address {
    font-size: 17px;
  }
  
  .branch-card__content {
    padding: 12px 20px;
    gap: 10px;
  }
  
  .branch-card__info-item {
    font-size: 14px;
  }
  
  .branch-card__footer {
    padding: 12px 20px 20px;
    gap: 10px;
  }
  
  .branch-card__action {
    height: 44px;
    font-size: 15px;
  }
}

/* ========== Apple 2025 Reviews ========== */
.reviews-container {
  max-width: 100%;
}

.reviews-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 16px;
  margin-bottom: 24px;
}

.reviews-filter label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: #000000;
  white-space: nowrap;
}

.branch-select {
  flex: 1;
  min-height: 48px;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  background: #FFFFFF;
  color: #000000;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.branch-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.review-card {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.review-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
}

.review-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 16px;
}

.review-card__author {
  display: flex;
  align-items: center; 
  gap: 12px;
}

.review-card__avatar {
  border-radius: 50%;
  flex-shrink: 0;
}

.review-card__author-name {
  font-weight: 600;
  font-size: 16px;
  color: #000000;
}

.review-card__date {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.5);
  margin-top: 2px;
}

.review-card__branch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0, 122, 255, 0.1);
  color: #007AFF;
  border-radius: 8px; 
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.review-card__branch .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.review-card__rating {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 1;
}

.review-card__rating .oc-star {
  color: #E5E7EB;
  transition: color 0.2s ease;
}

.review-card__rating .oc-star.is-on {
  color: #FFB400;
}

.review-card__content {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.8);
}

.review-card__content p:last-child {
  margin-bottom: 0;
}

/* Ответы на отзывы */
.review-reply {
  margin-top: 16px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
  border-left: 3px solid #007AFF;
}

.review-reply__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.review-reply__avatar {
  border-radius: 50%;
  flex-shrink: 0;
}

.review-reply__author {
  font-weight: 600;
  font-size: 14px;
  color: #000000;
}

.review-reply__date {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.5);
  margin-top: 2px;
}

.review-reply__content {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.7);
  padding-left: 46px;
}

.review-reply__content p:last-child {
  margin-bottom: 0;
}

.review-card__footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.review-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(0, 122, 255, 0.1);
  color: #007AFF;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.review-reply-btn:hover {
  background: rgba(0, 122, 255, 0.15);
}

.review-reply-btn .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.reviews-empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(0, 0, 0, 0.4);
}

.reviews-empty .dashicons {
  font-size: 48px;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
}

.reviews-empty p {
  font-size: 16px;
  margin: 0;
}

/* Заголовок формы */
#review-form-title {
  margin: 32px 0 16px;
  font-size: 24px;
  font-weight: 700;
  color: #000000;
  letter-spacing: -0.02em;
}

/* Форма отзыва = контейнер со всеми стилями */
.review-form-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 16px 0 0;
  overflow: hidden; /* Предотвращаем выход за границы */
  contain: layout paint; /* Изоляция для предотвращения выплеска теней/трансформаций */
}

.review-form-container * {
  box-sizing: border-box;
}

/* Дочерние элементы формы занимают 85% ширины контейнера и центрируются */
.review-form-container > * {
  width: 85%;
  max-width: 85%;
  margin-left: auto;
  margin-right: auto;
}

/* совместная ширина элементов формы */
.comment-form-author .form-group,
.comment-form-comment .form-group {
  width: 100%;
}

.form-group {
  margin: 0;
  position: relative;
}

.comment-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 15px;
  color: #000000;
  letter-spacing: -0.01em;
}

.comment-form label.sr-only {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.comment-form .required {
  color: #FF3B30;
  margin-left: 2px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea,
.comment-form select {
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  font-size: 16px;
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.04);
  color: #000000;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.comment-form textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.5;
}

.comment-form input:focus,
.comment-form textarea:focus,
.comment-form select:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.06);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

/* Валидация и ошибки */
.comment-form input.is-invalid,
.comment-form textarea.is-invalid,
.comment-form select.is-invalid {
  border: 2px solid #FF3B30 !important;
  background: rgba(255, 59, 48, 0.05);
}

.form-error {
  color: #FF3B30;
  font-size: 13px;
  margin: 8px 0 0;
  min-height: 0;
  display: block;
}

.form-error:empty {
  display: none;
}

/* Счетчик символов */
.char-counter {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
  text-align: right;
  margin-top: 6px;
}

.char-counter.warning {
  color: #FF9500;
}

.char-counter.error {
  color: #FF3B30;
}

/* Согласие на обработку персональных данных - перед кнопкой */
.comment-form-privacy {
  order: 102; /* После reCAPTCHA, перед кнопкой */
  margin: 0;
  padding: 20px 24px;
  background: rgba(0, 122, 255, 0.04);
  border-radius: 14px;
  border: 1px solid rgba(0, 122, 255, 0.08);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.privacy-label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  position: relative;
  user-select: none;
  margin: 0;
  font-weight: normal;
}

.privacy-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.privacy-checkmark {
  position: relative;
  height: 24px;
  width: 24px;
  min-width: 24px;
  background: #FFFFFF;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  transition: all 0.2s ease;
  margin-top: 0;
}

.privacy-label:hover .privacy-checkmark {
  border-color: #007AFF;
  background: rgba(0, 122, 255, 0.05);
}

.privacy-label input:checked ~ .privacy-checkmark {
  background: #007AFF;
  border-color: #007AFF;
}

.privacy-checkmark::after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.privacy-label input:checked ~ .privacy-checkmark::after {
  display: block;
}

.privacy-label input:focus-visible ~ .privacy-checkmark {
  outline: 2px solid #007AFF;
  outline-offset: 2px;
}

.privacy-label.is-invalid .privacy-checkmark {
  border-color: #FF3B30;
  background: rgba(255, 59, 48, 0.05);
}

.privacy-text {
  flex: 1;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.85);
  margin-top: 1px;
}

.privacy-text a {
  color: #007AFF;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(0, 122, 255, 0.3);
  transition: all 0.2s ease;
}

.privacy-text a:hover {
  color: #0051D5;
  border-bottom-color: #0051D5;
}

/* Кнопка отправки */
.review-submit-btn {
  width: 100%;
  max-width: 100%;
  height: 56px;
  background: #007AFF;
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-submit-btn:hover {
  background: #0051D5;
  transform: scale(1.01);
}

.review-submit-btn:active {
  transform: scale(0.98);
}

.review-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.comment-notes-after {
  display: none; /* Скрываем плашку о модерации */
}

/* Контекст ответа */
#reply-context {
  display: none;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(0, 122, 255, 0.08);
  border-left: 3px solid #007AFF;
  border-radius: 12px;
}

#reply-context.active {
  display: block;
}

.reply-context__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.reply-context__title {
  font-size: 14px;
  font-weight: 600;
  color: #007AFF;
}

.reply-context__cancel {
  background: none;
  border: none;
  color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s ease;
}

.reply-context__cancel:hover {
  color: #000000;
}

.reply-context__content {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.7);
  font-style: italic;
}

/* Нативный рейтинг radio с доступностью */
.rating-group {
  margin: 0;
  border: none;
  padding: 14px 12px; /* симметрично, без лишних полей */
  display: flex;
  flex-direction: column; /* легенда -> звезды -> текст подсказки */
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  backdrop-filter: saturate(160%) blur(6px);
}

.rating-group legend {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 15px;
  color: #000000;
  letter-spacing: -0.01em;
}

.rating {
  display: flex; /* по левому краю */
  justify-content: flex-start;
  align-items: center;
  flex-direction: row-reverse; /* логика подсветки */
  gap: 8px;
  padding: 0; /* без внутреннего отступа слева */
  order: 1;
  align-self: flex-start; /* не центрируем внутри контейнера */
  margin-left: 0 !important; /* убираем любые внешние отступы слева */
}

.rating input {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.rating label {
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  color: rgba(0,0,0,0.25); /* контур */
  -webkit-text-stroke: 1px rgba(0,0,0,0.18);
  text-shadow: 0 1px 0 rgba(255,255,255,0.55);
  padding: 8px;
  border-radius: 12px;
  transition: transform 0.12s ease, color 0.2s ease, -webkit-text-stroke 0.2s ease, box-shadow 0.2s ease;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rating label:hover,
.rating label:hover ~ label {
  color: transparent;
  background-image: linear-gradient(180deg,#FFE39A 0%, #FFC54D 60%, #FF9F0A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(255,159,10,0.2));
  transform: translateY(-1px) scale(1.06);
  -webkit-text-stroke: 0 transparent;
}

.rating input:focus-visible + label {
  outline: 2px solid #0A84FF;
  outline-offset: 3px;
  color: transparent;
  background-image: linear-gradient(180deg,#FFE39A 0%, #FFC54D 60%, #FF9F0A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 0 transparent;
}

.rating input:checked ~ label {
  color: transparent;
  background-image: linear-gradient(180deg,#FFD66B 0%, #FFB300 70%, #FF9500 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(255,149,0,0.25));
  -webkit-text-stroke: 0 transparent;
}

.rating-hint {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.5);
  margin-top: 6px;
  min-height: 18px;
  order: 2; /* текст под звездами */
  padding-left: 2px;
}

.form-submit {
  margin: 0;
}

/* reCAPTCHA - видимый чекбокс перед кнопкой */
.comment-form-recaptcha {
  order: 100;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 12px 16px; /* визуальная ширина как у полей */
}

.g-recaptcha {
  -webkit-transform-origin: 0 0;
  transform-origin: 0 0;
  max-width: 100%;
  position: relative;
  z-index: 1;
  pointer-events: auto;
  margin: 0; /* притянуть к левому краю контейнера */
}

/* Масштабируем reCAPTCHA на мобильных если нужно */
@media (max-width: 380px) {
  .g-recaptcha {
    -webkit-transform: scale(0.9);
    transform: scale(0.9);
    height: 70px; /* скорректированная высота под масштаб */
  }
}
@media (max-width: 360px) {
  .g-recaptcha {
    -webkit-transform: scale(0.86);
    transform: scale(0.86);
    height: 67px;
  }
}
@media (max-width: 330px) {
  .g-recaptcha {
    -webkit-transform: scale(0.8);
    transform: scale(0.8);
    height: 62px;
  }
}

.recaptcha-legal {
  display: block;
  margin: 0;
  color: rgba(0, 0, 0, 0.5);
  font-size: 12px;
  line-height: 1.6;
}

.recaptcha-legal a {
  color: rgba(0, 0, 0, 0.6);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.2);
}

.recaptcha-legal a:hover {
  color: #007AFF;
  text-decoration-color: #007AFF;
}

.form-submit {
  order: 103; /* После согласия */
}

.reviews-closed {
  text-align: center;
  padding: 20px;
  color: rgba(0, 0, 0, 0.5);
}

@media (max-width: 640px) {
  .reviews-filter {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .review-card {
    padding: 16px;
  }
  
  .review-card__header {
    flex-direction: column;
    gap: 12px;
  }
  
  .review-card__branch {
    align-self: flex-start;
  }
  
  #review-form-title {
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 20px;
  }
  
  .review-form-container {
    padding: 16px 12px;
    border-radius: 16px;
    gap: 16px;
    margin: 12px 0 0;
    overflow-x: hidden;
  }

  .review-form-container > * {
    width: 100%;
    max-width: 100%;
  }
  
  .comment-form input[type="text"],
  .comment-form input[type="email"],
  .comment-form textarea,
  .comment-form select {
    min-height: 48px;
    max-width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 16px; /* Минимум 16px чтобы iOS не зумил */
  }
  
  .comment-form textarea {
    min-height: 120px;
  }
  
  .review-submit-btn {
    height: 52px;
    font-size: 16px;
    max-width: 100%;
  }
  
  .rating label {
    font-size: 30px;
    min-width: 40px;
    min-height: 40px;
    padding: 6px;
    max-width: 100%;
  }
  .rating,
  .rating-group {
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
    overflow: hidden;
  }
  
  .comment-form-privacy {
    padding: 16px;
    max-width: 100%;
    overflow: hidden;
  }
  
  .privacy-text {
    font-size: 14px;
    overflow-wrap: anywhere;
  }
  
  .g-recaptcha {
    max-width: 100%;
  }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
  .review-card {
    background: #1C1C1E;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(255, 255, 255, 0.1);
  }
  
  .review-card__author-name {
    color: #FFFFFF;
  }
  
  .review-card__date {
    color: rgba(255, 255, 255, 0.5);
  }
  
  .review-card__content {
    color: rgba(255, 255, 255, 0.8);
  }
  
  .review-card__rating .oc-star {
    color: rgba(255, 255, 255, 0.2);
  }
  
  .review-card__rating .oc-star.is-on {
    color: #FFB400;
  }
  
  .reviews-filter {
    background: rgba(255, 255, 255, 0.05);
  }
  
  #review-form-title {
    color: #FFFFFF;
  }
  
  .review-form-container {
    background: #1C1C1E;
  }
  
  .rating label {
    color: rgba(255, 255, 255, 0.2);
  }
  
  .rating label:hover,
  .rating label:hover ~ label {
    color: #FFC940;
  }
  
  .rating input:checked ~ label {
    color: #FFB400;
  }
  
  .rating-group legend {
    color: #FFFFFF;
  }
  
  .rating-hint {
    color: rgba(255, 255, 255, 0.5);
  }
  
  .form-error {
    color: #FF453A;
  }
  
  .branch-select,
  .comment-form input,
  .comment-form textarea {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
  }
  
  .recaptcha-legal {
    color: rgba(255, 255, 255, 0.5);
  }
  
  .comment-form label,
  .rating-group legend {
    color: #FFFFFF;
  }
  
  .comment-form-privacy {
    background: rgba(0, 122, 255, 0.08);
    border-color: rgba(0, 122, 255, 0.15);
  }
  
  .privacy-checkmark {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
  }
  
  .privacy-label:hover .privacy-checkmark {
    background: rgba(0, 122, 255, 0.2);
    border-color: #007AFF;
  }
  
  .privacy-label input:checked ~ .privacy-checkmark {
    background: #007AFF;
    border-color: #007AFF;
  }
  
  .privacy-text {
    color: rgba(255, 255, 255, 0.9);
  }
  
  .privacy-text a {
    color: #007AFF;
    border-bottom-color: rgba(0, 122, 255, 0.4);
  }
  
  .privacy-text a:hover {
    color: #4DA3FF;
    border-bottom-color: #4DA3FF;
  }
  
  .review-reply-btn {
    background: rgba(0, 122, 255, 0.15);
    color: #007AFF;
  }
  
  .review-card__footer {
    border-top-color: rgba(255, 255, 255, 0.1);
  }
  
  .review-reply {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: #007AFF;
  }
  
  .review-reply__author {
    color: #FFFFFF;
  }
  
  .review-reply__date {
    color: rgba(255, 255, 255, 0.5);
  }
  
  .review-reply__content {
    color: rgba(255, 255, 255, 0.7);
  }
  
  #reply-context {
    background: rgba(0, 122, 255, 0.1);
    border-left-color: #007AFF;
  }
  
  .reply-context__title {
    color: #007AFF;
  }
  
  .reply-context__content {
    color: rgba(255, 255, 255, 0.7);
  }
  
  .reply-context__cancel {
    color: rgba(255, 255, 255, 0.5);
  }
  
  .reply-context__cancel:hover {
    color: #FFFFFF;
  }
  
  .comment-form-recaptcha {
    background: rgba(0, 122, 255, 0.08);
    border-color: rgba(0, 122, 255, 0.15);
  }
  
  .recaptcha-legal {
    color: rgba(255, 255, 255, 0.5);
  }
}

/* ========== Apple 2025 Loading States ========== */
.branch-card.loading {
  pointer-events: none;
  opacity: 0.6;
}

.branch-card__action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Skeleton loader для загрузки */
@keyframes shimmer {
  0% { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}

.skeleton {
  animation: shimmer 1.2s ease-in-out infinite;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.04) 0px,
    rgba(0, 0, 0, 0.08) 40px,
    rgba(0, 0, 0, 0.04) 80px
  );
  background-size: 468px 100%;
  border-radius: 8px;
}

/* Темная тема для Apple 2025 */
@media (prefers-color-scheme: dark) {
  .branch-card {
    background: #1C1C1E;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(255, 255, 255, 0.1);
  }
  
  .branch-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(255, 255, 255, 0.15);
  }
  
  .branch-card__header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  
  .branch-card__address {
    color: #FFFFFF;
  }
  
  .branch-card__tag {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
  }
  
  .branch-card__info-item {
    color: rgba(255, 255, 255, 0.8);
  }
  
  .branch-card__icon {
    color: rgba(255, 255, 255, 0.5);
  }
  
  .branch-card__action--secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
  }
  
  .branch-card__action--secondary:hover {
    background: rgba(255, 255, 255, 0.15);
  }
  
  .branch-card__action--review {
    background: #34C759;
  }
  
  .branch-card__action--review:hover {
    background: #30B350;
  }
  
  .branches-toolbar {
    background: rgba(28, 28, 30, 0.85);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(255, 255, 255, 0.1);
  }
  
  #branch-search,
  #branch-ao,
  #filters-reset {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
  }
  
  #branch-search::placeholder {
    color: rgba(255, 255, 255, 0.4);
  }
  
  #branch-ao:hover,
  #filters-reset:hover {
    background: rgba(255, 255, 255, 0.15);
  }
  
  .label-open-filter {
    color: #FFFFFF;
  }
  
  .apple-checkbox-label {
    color: #FFFFFF;
  }
  
  .apple-checkbox-label::before {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
  }
  
  .apple-checkbox:checked + .apple-checkbox-label::before {
    background: #007AFF;
    border-color: #007AFF;
  }
}

/* ========== Dashicons utilities ========== */
.sr-only { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.ico { display:inline-flex; align-items:center; gap:6px; }
.ico .dashicons { width: 20px; height: 20px; font-size: 20px; line-height: 1; }
.ico-sm .dashicons { width:16px; height:16px; font-size:16px; }
.ico-lg .dashicons { width:24px; height:24px; font-size:24px; }

[data-type-color] .dashicons { color: var(--type-color); }
[data-type-color] { --type-color: var(--seo-primary); }

.ico-muted .dashicons { color: var(--seo-muted); }
.ico-success .dashicons { color: #0a7a3c; }
.ico-warning .dashicons { color: #b45309; }
.ico-danger  .dashicons { color: #b91c1c; }

.ico-spin .dashicons { animation: spin 1.1s linear infinite; display:inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Заголовки с иконками */
.title-with-ico { display:flex; align-items:center; gap:10px; }
.title-with-ico .dashicons { color: var(--type-color, var(--seo-primary)); }

/* Табы с иконками */
.seo-tabs a .dashicons { margin-right: 6px; }

/* Бейджи-иконки */
.badge .dashicons { margin-right: 4px; }
.badge-open  .dashicons { color:#0a7a3c; }
.badge-closed .dashicons { color:#b91c1c; }

/* Фильтры с иконками */
.seo-filters .with-ico-wrap { position: relative; flex: 1; }
.seo-filters .with-ico-wrap .dashicons {
  position:absolute; left:10px; top:50%; transform:translateY(-50%);
  color:#64748b; pointer-events:none;
}
.seo-filters input.with-ico, .seo-filters select.with-ico {
  padding-left: 34px;
}

/* Focus для доступности */
.badge:focus-visible, .btn-ghost:focus-visible, .seo-tabs a:focus-visible {
  outline: 2px solid var(--seo-accent); outline-offset: 2px;
}

/* ========== Modal consent ========== */
.modalDialog { 
  position: fixed; 
  font-family: inherit; 
  top:0; right:0; bottom:0; left:0; 
  background: rgba(0,0,0,.5); 
  z-index: 9999; 
  opacity:0; 
  pointer-events:none; 
  transition: opacity .2s; 
}
.modalDialog:target { 
  opacity:1; 
  pointer-events: all; 
}
#commentform { 
  width: min(90vw, 420px); 
  margin: 10% auto; 
  padding: 20px; 
  background: #fff; 
  border-radius: 10px; 
  position: relative; 
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
}
#commentform .close { 
  position:absolute; 
  right:12px; 
  top:10px; 
  text-decoration:none; 
  font-weight:700; 
  font-size: 20px;
  color: #999;
  line-height: 1;
}
#commentform .close:hover {
  color: #333;
}
#commentform h6 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}
#button7 { 
  padding: 10px 20px; 
  background: var(--seo-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}
#button7:hover {
  background: var(--seo-accent);
}

/* ========== Map containers ========== */
.address__map, .seo-map, .ymap { 
  width: 100% !important; 
  height: 420px !important;
  min-height: 420px !important;
  max-height: 420px !important;
  border-radius: 8px; 
  border: 1px solid #e5e7eb; 
  overflow: hidden; 
  position: relative;
  display: block;
  background: #f8f9fa; /* Светлый фон для загрузки */
}
.ymap * {
  box-sizing: content-box !important; /* Яндекс.Карты требуют content-box */
}

/* Принудительная видимость для Яндекс.Карт */
.ymap .ymaps-2-1-79-map,
.ymap .ymaps-2-1-79-map-container,
.ymap .ymaps-2-1-79-tile-pane,
.ymap .ymaps-2-1-79-places-pane,
.ymaps-2-1-79-map,
.ymaps-2-1-79-map-container {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 1 !important;
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  background: white !important;
}

/* Убираем все возможные скрытия */
.ymap * {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Убираем временный фон после загрузки карты */
.ymap:has(.ymaps-2-1-79-map) {
  background: transparent !important;
}

/* Стили для Leaflet карт */
.address__map .leaflet-container,
.seo-map .leaflet-container,
.ymap .leaflet-container {
  width: 100% !important;
  height: 100% !important;
  border-radius: 8px;
}

/* Убираем фон после загрузки Leaflet */
.address__map:has(.leaflet-container),
.seo-map:has(.leaflet-container),
.ymap:has(.leaflet-container) {
  background: transparent !important;
}
@media (max-width:640px){ 
  .address__map, .seo-map, .ymap{ 
    height: 360px !important;
    min-height: 360px !important;
    max-height: 360px !important;
  } 
}

/* ========== Apple 2025 Filters Panel ========== */
.branches-toolbar {
  position: sticky;
  top: 64px;
  z-index: 30;
  backdrop-filter: saturate(180%) blur(20px);
  background: rgba(255, 255, 255, 0.85);
  border: none;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

#branch-search {
  flex: 1 1 280px;
  min-height: 48px;
  font-size: 16px; 
  border: none;
  border-radius: 12px; 
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.04);
  color: #000000;
  font-family: inherit;
  transition: all 0.2s ease;
}

#branch-search:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.06);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

#branch-search::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

#branch-ao {
  min-height: 48px;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.04);
  color: #000000;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 200px;
}

#branch-ao:hover {
  background: rgba(0, 0, 0, 0.06);
}

#branch-ao:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

#filters-reset {
  padding: 12px 20px;
  min-height: 48px;
  border-radius: 12px;
  white-space: nowrap;
  border: none;
  background: rgba(0, 0, 0, 0.04);
  color: #000000;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

#filters-reset:hover {
  background: rgba(0, 0, 0, 0.08);
}

#filters-reset:active {
  background: rgba(0, 0, 0, 0.12);
  transform: scale(0.98);
}

/* Apple 2025 Checkbox Filter */
.label-open-filter {
  display: inline-flex;
  align-items: center; 
  cursor: pointer;
  user-select: none;
  min-height: 48px;
  padding: 0;
  transition: opacity 0.2s ease;
}

.label-open-filter:hover {
  opacity: 0.8;
}

.apple-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.apple-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  color: #000000;
  position: relative;
  padding-left: 32px;
}

.apple-checkbox-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  background: #FFFFFF;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.apple-checkbox:checked + .apple-checkbox-label::before {
  background: #007AFF;
  border-color: #007AFF;
}

.apple-checkbox-icon {
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  color: #FFFFFF;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.apple-checkbox:checked + .apple-checkbox-label .apple-checkbox-icon {
  transform: translateY(-50%) scale(1);
}

.apple-checkbox:focus + .apple-checkbox-label::before {
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.filters-meta { 
  display: flex; 
  align-items: center; 
  gap: 12px;
  margin-left: auto;
}

#found-count { 
  display: none;
}

@media (max-width: 782px){ 
  .branches-toolbar { 
    top: 52px; 
  } 
}

/* Mobile layout для фильтров - Apple 2025 */
@media (max-width: 640px){
  .branches-toolbar {
    position: sticky;
    top: 56px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-radius: 12px;
    padding: 12px;
  }
  
  #branch-search {
    width: 100%;
    height: 44px; /* Фиксированная высота */
    min-height: 44px;
    max-height: 44px; /* Запрет растягивания */
    font-size: 16px; /* Минимум 16px чтобы iOS не зумил */
    padding: 10px 12px; /* Уменьшенный padding */
    line-height: 1.2; /* Контроль высоты строки */
    box-sizing: border-box;
  }
  
  #branch-ao {
    width: 100%;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    min-width: auto;
    padding: 10px 12px;
    line-height: 1.2;
  }
  
  .label-open-filter {
    width: 100%;
    justify-content: flex-start;
    font-size: 15px;
    min-height: 44px;
    max-height: 44px;
  }
  
  .apple-checkbox-label {
    font-size: 15px;
    padding-left: 28px;
  }
  
  .apple-checkbox-label::before {
    width: 20px;
    height: 20px;
  }
  
  .filters-meta {
    width: 100%;
    margin-left: 0;
    justify-content: stretch;
  }
  
  #filters-reset {
    width: 100%;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    font-size: 15px;
    padding: 10px 12px;
    line-height: 1.2;
  }
}

/* Очищено - новые стили в Apple 2025 секции */

/* ========== Шапка организации Apple-стиль ========== */
.org-head dl { 
  display: flex; /* FLEX разметка вместо grid */
  flex-wrap: wrap;
  column-gap: 12px;
  row-gap: 8px;
  margin: 0; 
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.org-head dt { 
  color: var(--ios-muted); 
  font-weight: 600; 
  font-size: 0.9rem;
  flex: 0 0 200px; /* фиксированная колонка слева */
  max-width: 100%;
}
.org-head dd { 
  margin: 0; 
  color: var(--ios-label);
  flex: 1 1 0%; /* правая колонка тянется */
  min-width: 0; /* позволяет перенос */
  overflow-wrap: anywhere;
}
.org-head .phones a { 
  white-space: normal; /* разрешаем перенос */
  word-break: break-word;
}

@media (max-width: 640px){
  .org-head dl { 
    flex-direction: column; /* Вертикальная раскладка на мобильных */
    gap: 12px;
  }
  .org-head dt { 
    flex-basis: auto; /* Убираем фиксированную ширину */
    width: 100%;
    margin-bottom: 4px;
  }
  .org-head dd { 
    flex: none; /* Убираем flex на мобильных */
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  .org-head .phones a {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 4px;
  }
}
.org-head .phones .more { 
  color: #64748b; 
  cursor: pointer;
  text-decoration: underline;
}
.org-cta { 
  margin-top: 10px; 
  display: flex; 
  flex-wrap: wrap; 
  gap: 8px; 
}
.org-cta .btn-ghost { 
  padding: 8px 12px; 
}

/* ========== Карта и действия ========== */
.map-actions { 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
  margin-top: 8px; 
}
.map-actions .btn-ghost { 
  padding: 8px 12px; 
}

/* ========== Вкладки ========== */
.seo-tabs a { 
  padding: 6px 10px; 
  border-radius: 8px;
  text-decoration: none;
}
.seo-tabs a:hover {
  text-decoration: none;
  background: #f8f9fa;
}
.seo-tabs a.active { 
  background: #eef3ff; 
  border: 1px solid #d7e2ff;
  text-decoration: none;
}

/* ========== Тумблер ========== */
.switch { 
  position: relative; 
  display: inline-block; 
  width: 44px; 
  height: 24px; 
  vertical-align: middle;
  margin-left: 8px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch span {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #e5e7eb;
  border-radius: 999px;
  transition: .2s;
}
.switch span:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}
.switch input:checked + span {
  background: #22c55e;
}
.switch input:checked + span:before {
  transform: translateX(20px);
}

/* ========== Метаданные фильтров ========== */
.filters-meta { 
  margin-left: auto; 
  color: #64748b; 
  display: flex; 
  gap: 10px; 
  align-items: center; 
}

/* Старые стили удалены - используем новые из Apple 2025 секции */

/* Старые стили удалены */

/* Focus visible для доступности */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Минимальная зона клика */
.btn-ghost,
.badge {
  min-height: 44px;
  min-width: 44px;
}

/* Убираем голубой хайлайт в iOS */
* { 
  -webkit-tap-highlight-color: rgba(0,0,0,0); 
}

/* Touch-action для кнопок */
.btn-ghost, 
.badge, 
button { 
  touch-action: manipulation; 
}

/* Выравнивание иконок в кнопках */
.btn-ghost span, 
.btn-ghost .dashicons { 
  vertical-align: middle; 
}

/* Безопасная зона для прокрутки */
/* Очищено */

/* ========== Похожие компании ========== */
.similar-list { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
  gap: 12px; 
}

.similar-card { 
  display: block; 
  padding: 12px; 
  border-radius: 12px; 
  border: 1px solid var(--seo-border, #e9ecef); 
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.similar-card:hover { 
  box-shadow: 0 8px 24px rgba(0,0,0,.06); 
  transform: translateY(-1px);
  text-decoration: none;
}

.similar-card:focus-visible { 
  outline: 2px solid var(--seo-accent, #3b82f6); 
  outline-offset: 2px; 
}

.sim-head { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  margin-bottom: 6px; 
}

.sim-title { 
  font-size: 1rem; 
  margin: 0; 
  line-height: 1.2;
  color: #1e293b;
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis;
}

.avatar {
  width: 28px; 
  height: 28px; 
  border-radius: 50%;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-weight: 700; 
  font-size: .85rem; 
  color: #334155;
  background: linear-gradient(135deg, #eef3ff, #e9f0ff); 
  border: 1px solid #d7e2ff;
  flex-shrink: 0;
}

.sim-meta, 
.sim-cta { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 6px; 
}

.sim-meta { 
  margin-bottom: 6px; 
}

.similar-card .badge { 
  background: #f5f7fb; 
  border-color: #e0e6f5; 
  color: #384861;
  font-size: 0.85rem;
  padding: 4px 8px;
}

.similar-card .badge .dashicons { 
  margin-right: 4px; 
}

/* Убираем подчёркивание у всех интерактивных элементов */
.seo-card a,
.seo-nav a,
.similar-card a {
  text-decoration: none;
}

.seo-card a:hover,
.seo-nav a:hover {
  text-decoration: none;
}

/* Badge-pill для счётчиков */
.badge-pill { 
  border-radius: 999px; 
  padding: 2px 8px; 
}

/* Кнопка "Показать ещё" для похожих */
#similar-more {
  margin-top: 10px;
  cursor: pointer;
}

/* Иконка загрузки (спиннер) */
.ico-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .similar-list {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  .similar-card {
    padding: 14px;
    border-radius: 12px;
  }
  
  .sim-title {
    font-size: 0.95rem;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
  }
  
  .sim-meta,
  .sim-cta {
    gap: 8px;
  }
  
  .similar-card .badge {
    font-size: 0.8rem;
    padding: 6px 10px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .similar-list {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  
  .similar-card {
    padding: 12px;
    border-radius: 10px;
  }
  
  .sim-head {
    gap: 8px;
    margin-bottom: 8px;
  }
  
  .avatar {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  
  .sim-title {
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  .sim-meta {
    margin-bottom: 8px;
    gap: 6px;
  }
  
  .sim-cta {
    gap: 6px;
    flex-wrap: wrap;
  }
  
  .similar-card .badge {
    font-size: 0.75rem;
    padding: 8px 12px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
  }
  
  .similar-card .badge .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    margin-right: 6px;
  }
  
  #similar-more {
    width: 100%;
    min-height: 44px;
    padding: 12px;
    font-size: 0.9rem;
    margin-top: 12px;
  }
}

/* ========== Роутинг ========== */
/* Глушим LRM-панель полностью */
.leaflet-routing-container,
.leaflet-routing-alt,
.leaflet-routing-geocoders,
.leaflet-routing-error,
.leaflet-routing-waypoint,
.leaflet-routing-distance,
.leaflet-routing-time { 
  display: none !important; 
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
}

.route-toolbar { 
  display: flex; 
  gap: 8px; 
  align-items: center; 
  flex-wrap: wrap; 
}

.route-toolbar input[type="text"],
.route-toolbar select { 
  min-height: 44px; 
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--seo-border, #e9ecef);
  border-radius: 10px;
}

#route-from { 
  flex: 1 1 220px;
}

#route-branch { 
  flex: 1 1 260px;
}

/* Сегментный переключатель режимов */
.route-modes { 
  display: flex; 
  border: 1px solid var(--seo-border, #e9ecef); 
  border-radius: 10px; 
  overflow: hidden; 
}

.route-modes label { 
  display: flex; 
  align-items: center; 
  gap: 6px; 
  padding: 8px 10px; 
  min-height: 44px; 
  cursor: pointer;
  transition: all 0.2s ease;
  border-right: 1px solid var(--seo-border, #e9ecef);
}

.route-modes label:last-child {
  border-right: none;
}

.route-modes label:hover {
  background: #f8f9fa;
}

.route-modes label.active { 
  background: #eef3ff; 
}

/* Кнопки */
.route-toolbar .btn-ghost { 
  min-height: 44px; 
  padding: 8px 14px; 
}

.route-toolbar .btn-ghost .dashicons { 
  margin-right: 6px; 
  position: relative; 
  top: 1px; 
}

/* Карта */
#route-map { 
  height: 420px; 
  border-radius: 12px; 
  border: 1px solid var(--seo-border, #e9ecef); 
  overflow: hidden; 
}

/* Метки A/B */
.route-pin { 
  background: #1e40af; 
  color: #fff; 
  width: 24px; 
  height: 24px; 
  border-radius: 50%; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-weight: 700; 
}

.route-pin.to { 
  background: #0f766e; 
}

.route-summary .badge { 
  margin-top: 8px;
  margin-right: 8px;
  display: inline-flex;
}

.nearby-list .badge { 
  margin-right: 6px; 
  margin-top: 6px; 
  display: inline-flex; 
}

#route-stats {
  display: none;
  margin-top: 10px;
}

#route-steps {
  display: none;
}

@media (max-width: 640px) {
  .route-toolbar {
    position: sticky;
    top: 56px;
    z-index: 30;
    background: #fff;
    padding: 8px;
    border: 1px solid var(--seo-border, #e9ecef);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
  }
  
  .route-toolbar input[type="text"],
  .route-toolbar select {
    width: 100%;
  }
  
  #route-map {
    height: 360px;
  }
}

/* ========== Стили для шаблона отрасли (page-author-102) ========== */

/* KPI панель */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.kpi {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.kpi__val {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ios-accent);
  letter-spacing: -0.02em;
}

.kpi__name {
  font-size: 13px;
  color: var(--ios-muted);
  margin-top: 4px;
  font-weight: 500;
}

.kpi--muted .kpi__val {
  color: var(--ios-muted);
}

/* Мини-карточки */
.seo-card.mini {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  cursor: default;
  transition: all 0.2s ease;
}

.mini__left {
  min-width: 0;
}

.mini__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.3;
}

.mini__title a {
  color: inherit;
  text-decoration: none;
}

.mini__title a:hover {
  color: var(--ios-accent);
}

.mini__sub {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
}

.stars {
  position: relative;
  width: 80px;
  height: 14px;
  background: #E5E7EB;
  border-radius: 7px;
  overflow: hidden;
}

.stars__bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(135deg, #FFB400, #FF8800);
  transition: width 0.3s ease, background 0.3s ease;
}

.stars--excellent .stars__bar {
  background: linear-gradient(135deg, #34C759, #30D158);
}

.stars--good .stars__bar {
  background: linear-gradient(135deg, #FFB400, #FF8800);
}

.stars--ok .stars__bar {
  background: linear-gradient(135deg, #FF9500, #FF6600);
}

.stars--poor .stars__bar {
  background: linear-gradient(135deg, #FF3B30, #D62828);
}

.mini__reviews {
  color: var(--ios-muted);
  text-decoration: none;
  font-size: 13px;
}

.mini__reviews:hover {
  color: var(--ios-accent);
}

.mini__rate {
  color: var(--ios-accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.mini__rate:hover {
  text-decoration: underline;
}

.mini__nr {
  color: var(--ios-muted);
  font-size: 13px;
  font-style: italic;
}

.mini__meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
  color: #374151;
}

.mini__addr {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}

.mini__tel {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ios-accent);
  text-decoration: none;
  white-space: nowrap;
}

.mini__tel:hover {
  text-decoration: underline;
}

.mini__more {
  background: none;
  border: none;
  color: var(--ios-accent);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-decoration-style: dashed;
}

.mini__more:hover {
  text-decoration-style: solid;
}

.mini__chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--ios-muted);
  font-weight: 500;
}

.mini__ctrl {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}

.mini__ctrl .btn-ghost {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--ios-accent) !important;
  color: white !important;
  border-color: var(--ios-accent) !important;
}

.btn-primary:hover {
  background: var(--ios-accent-press) !important;
}


.btn-ghost.js-branches.is-on {
  background: var(--ios-accent);
  color: white;
}

.btn-ghost.js-share.ok {
  background: var(--ios-success);
  color: white;
  transition: all 0.2s ease;
}

.badge.dist {
  font-variant-numeric: tabular-nums;
  min-width: 60px;
  text-align: center;
}

/* Sticky фильтры */
.branches-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--ios-hairline);
  margin-bottom: 16px;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .mini__addr {
    max-width: 250px;
  }
}

@media (max-width: 560px) {
  .mini__chips {
    display: none;
  }
  
  .mini__addr {
    max-width: calc(100vw - 200px);
  }
  
  .seo-card.mini {
    padding: 10px 12px;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .mini__ctrl .btn-ghost:not(.btn-primary) {
    display: none;
  }
  
  .mini__meta {
    gap: 8px;
    font-size: 12px;
  }
  
  .mini__title {
    font-size: 15px;
  }
}
.badge-geo {
  background: linear-gradient(135deg, #34C759, #30D158);
  color: white;
  font-weight: 500;
  border: none;
}

#no-results {
  opacity: 0.6;
}

#no-results .dashicons {
  display: block;
  margin: 0 auto 16px;
}

#nearest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#nearest-list h3 {
  width: 100%;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.map-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.map-actions .segment {
  flex: 1 1 auto;
  min-width: 200px;
}

.map-filter-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  flex-wrap: wrap;
}

.map-filter-panel .filter-group {
  flex: 1 1 250px;
  min-width: 200px;
  display: flex;
  align-items: center;
  position: relative;
}

.map-filter-panel .filter-group .dashicons {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: var(--ios-muted);
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.map-filter-panel .filter-group input {
  padding-left: 40px;
  height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 14px;
  background: white;
  width: 100%;
  box-sizing: border-box;
}

.map-filter-panel select {
  flex: 1 1 250px;
  min-width: 200px;
  height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 14px;
  background: white;
  padding: 0 12px;
  box-sizing: border-box;
}

.map-filter-panel .btn-ghost {
  height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-filter-panel .btn-ghost:hover {
  background: var(--ios-accent);
  color: white;
  border-color: var(--ios-accent);
}

.map-filter-panel .btn-ghost .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.map-center-info {
  margin-top: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.map-center-info__title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--ios-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.map-center-info__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-center-info__list .badge {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  cursor: pointer;
}

.map-center-info__list .badge:hover {
  background: var(--ios-accent);
  color: white;
  border-color: var(--ios-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.2);
}

@media (max-width: 768px) {
  .map-filter-panel {
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .map-filter-panel .filter-group {
    flex: 0 0 120px;
    min-width: 120px;
  }
  
  .map-filter-panel .filter-group input {
    height: 32px;
    font-size: 13px;
    padding-left: 28px;
  }
  
  .map-filter-panel .filter-group .dashicons {
    left: 6px;
    font-size: 12px;
    width: 12px;
    height: 12px;
  }
  
  .map-filter-panel select {
    flex: 0 0 100px;
    min-width: 100px;
    height: 32px;
    font-size: 13px;
    padding: 0 6px;
  }
  
  .map-filter-panel .btn-ghost {
    flex: 0 0 auto;
    height: 32px;
    font-size: 13px;
    padding: 0 8px;
    white-space: nowrap;
  }
  
  .map-filter-panel .btn-ghost .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
  }
  
  .map-center-info {
    padding: 6px 8px;
  }
  
  .map-center-info__title {
    font-size: 11px;
    margin-bottom: 6px;
  }
  
  .map-center-info__list {
    gap: 3px;
  }
  
  .map-center-info__list .badge {
    font-size: 11px;
    padding: 4px 6px;
  }
}

/* Анимации для синхронизации */
@keyframes blink {
  0%, 100% { background: transparent; }
  50% { background: rgba(10, 132, 255, 0.1); }
}

.seo-card.blink {
  animation: blink 0.8s ease-in-out 2;
}

.seo-card.hover-from-map {
  background: rgba(10, 132, 255, 0.05);
  box-shadow: 0 4px 20px rgba(10, 132, 255, 0.15);
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

/* Pulse для маркеров */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.leaflet-marker-icon.pulse {
  animation: pulse 1s ease-in-out infinite;
}

/* Кнопка "На карте" в карточке */
.card-map {
  min-width: auto !important;
  padding: 8px 12px !important;
  font-size: 14px;
}

@media (max-width: 768px) {
  .map-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .map-actions .segment {
    width: 100%;
  }
  
  .map-actions .label-open-filter {
    width: 100%;
    justify-content: center;
  }
}

/* ========== Тёмная тема ========== */
@media (prefers-color-scheme: dark) {
  :root {
    --ios-bg: #000;
    --ios-card: #1C1C1E;
    --ios-label: rgba(255,255,255,.92);
    --ios-muted: rgba(235,235,245,.6);
    --ios-hairline: rgba(84,84,88,.65);
  }
  .btn-ghost { 
    background: #1C1C1E; 
    color: var(--ios-label);
  }
  .badge { 
    background: #2C2C2E; 
    border-color: var(--ios-hairline); 
    color: var(--ios-label);
  }
  .segment { 
    background: #1C1C1E; 
    border-color: var(--ios-hairline);
  }
  .branches-toolbar {
    background: rgba(28,28,30,.75);
  }
}

/* ========== Print styles ========== */
@media print {
  .seo-map, .seo-tabs, .seo-tab:not(#tab-price), .modalDialog, .branches-toolbar { 
    display: none !important; 
  }
  .seo-wrap { 
    max-width: none; 
    padding: 0; 
  }
  .seo-card:hover {
    box-shadow: none;
    transform: none;
  }
}

/* ========== Стили для прайс-листа ========== */
.price-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.price-category {
  background: var(--ios-card);
  border-radius: var(--r-card);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.price-category-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--ios-label);
  border-bottom: 2px solid var(--ios-accent);
  padding-bottom: 8px;
}

.price-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  background: var(--ios-bg);
  border-radius: 12px;
  border: 1px solid var(--ios-hairline);
  transition: all 0.2s ease;
}

.price-item:hover {
  background: #f8f9fa;
  border-color: var(--ios-accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.price-item-content {
  flex: 1;
  margin-right: 16px;
}

.price-item-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--ios-label);
  margin-bottom: 4px;
  line-height: 1.4;
}

.price-item-description {
  font-size: 14px;
  color: var(--ios-muted);
  line-height: 1.3;
}

.price-item-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  min-width: 120px;
}

.price-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--ios-accent);
  line-height: 1.2;
}

.price-unit {
  font-size: 12px;
  color: var(--ios-muted);
  margin-top: 2px;
}

.price-disclaimer {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  font-size: 14px;
  color: #6c757d;
  line-height: 1.5;
}

.price-disclaimer p {
  margin: 0;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .price-item {
    flex-direction: column;
    align-items: stretch;
  }
  
  .price-item-content {
    margin-right: 0;
    margin-bottom: 12px;
  }
  
  .price-item-price {
    align-items: flex-start;
    text-align: left;
    min-width: auto;
  }
  
  .price-category {
    padding: 16px;
  }
  
  .price-category-title {
    font-size: 16px;
  }
}

