/* ============================================
   IZIHOME · FOOTER (общий для всех страниц)
   Источник: /assets/partials/footer.html
   Инжектится: /assets/js/footer.js
   Зависит от CSS-переменных: --mint, --bg-block, --border-subtle,
   --text-secondary, --text-tertiary, --text-faint.
   ============================================ */

/* Placeholder до инжекта — резервирует высоту, чтобы не было CLS */
#site-footer:empty {
  display: block;
  min-height: 360px;
  border-top: 0.5px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
  background: var(--bg-block, #0F1412);
}
@media (min-width: 1024px) {
  #site-footer:empty { min-height: 280px; }
}

.site-footer {
  padding: 56px 0 28px;
  border-top: 0.5px solid var(--border-subtle);
  background: var(--bg-block);
}

.site-footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 5 колонок: brand (узкий, текст переносится), 3 контентных, контакты справа */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 36px;
}
@media (min-width: 640px)  { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px)  { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1fr 1.2fr; align-items: start; } }

.footer-brand .logo {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--text-primary);
  text-decoration: none;
}
.footer-brand .logo span { color: var(--mint); }

.footer-text {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.6;
  margin: 0 0 10px;
}
.footer-address {
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 0;
  letter-spacing: 0.01em;
}

.footer-col-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 180ms ease;
}
.footer-col a:hover,
.footer-col a.is-active { color: var(--mint); }

/* ===== Колонка «Контакты»: телефоны + соцсети-заглушки ===== */
.footer-col-contacts .footer-social {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 0.5px solid var(--border-subtle);
}
.footer-social-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.footer-col-contacts .footer-social-list {
  display: flex;
  flex-direction: row;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.soc-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}
.soc-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}
.soc-icon--coming {
  background: transparent;
  border: 1px dashed var(--border-default);
  color: var(--text-faint);
  cursor: not-allowed;
  opacity: 0.7;
}

/* ===== Legal row (документы) ===== */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 16px 0;
  border-top: 0.5px solid var(--border-subtle);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text-tertiary);
}
.footer-legal a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 180ms ease;
}
.footer-legal a:hover,
.footer-legal a.is-active { color: var(--mint); }
.footer-legal-sep {
  color: var(--text-faint);
  user-select: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 0.5px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-tertiary);
}
.footer-credit-inline {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.footer-credit-inline a {
  color: var(--text-tertiary);
  font-weight: 600;
  text-decoration: none;
  transition: color 180ms ease;
}
.footer-credit-inline a:hover { color: var(--mint); }

/* ============================================
   COOKIE BANNER
   --------------------------------------------
   HTML рендерится в /assets/partials/footer.html, контролируется inline-JS.
   Появляется при первом визите, скрывается на 365 дней после выбора.
   Публичный API: window.izihome.consent.{essential|analytics|set|reset}.
   Event: document на 'izihome:consent-changed' с detail = состояние.
   ============================================ */

.izi-cookie-banner[hidden] { display: none !important; }

.izi-cookie-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-block, #111916);
  border: 0.5px solid var(--mint-border, rgba(0, 255, 178, 0.30));
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.65);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary, #B0B8B5);
  animation: izi-cookie-in 280ms ease-out;
}

@media (min-width: 720px) {
  .izi-cookie-banner {
    left: auto;
    right: 24px;
    bottom: 24px;
    max-width: 440px;
  }
}

@keyframes izi-cookie-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.izi-cookie-text {
  margin: 0;
}
.izi-cookie-text strong {
  display: block;
  color: var(--text-primary, #F0F0EC);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.izi-cookie-text a {
  color: var(--mint, #00FFB2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease;
}
.izi-cookie-text a:hover {
  border-bottom-color: var(--mint-border, rgba(0, 255, 178, 0.30));
}

.izi-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.izi-cookie-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, filter 180ms ease;
  white-space: nowrap;
}
/* «Только необходимые» — равноценный «отказ»: одинаковый размер с primary,
   1px mint-border, mint-цвет текста. Требование РКН 2024 — симметрия выбора. */
.izi-cookie-btn-secondary {
  background: transparent;
  border: 1px solid var(--mint, #00FFB2);
  color: var(--mint, #00FFB2);
  font-weight: 600;
}
.izi-cookie-btn-secondary:hover {
  background: rgba(0, 255, 178, 0.08);
  color: var(--mint, #00FFB2);
}
.izi-cookie-btn-primary {
  background: linear-gradient(180deg, var(--mint, #00FFB2) 0%, var(--mint-deep, #0DC58A) 100%);
  border: none;
  color: var(--text-inverse, #0A0E0D);
  font-weight: 600;
}
.izi-cookie-btn-primary:hover {
  filter: brightness(1.06);
}

/* «Настройки cookies» в footer-legal — кнопка-ссылка */
.footer-legal-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: color 180ms ease;
}
.footer-legal-btn:hover { color: var(--mint); }
