/* Site footer + cookie consent */

#site-footer-mount {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.site-footer {
  margin-top: auto;
  background: rgb(9 11 22);
  border-top: 1px solid rgba(52, 60, 100, 0.55);
  color: #94a3b8;
  font-size: 0.875rem;
}

.site-footer__inner {
  max-width: var(--site-content-max, 1260px);
  margin: 0 auto;
  padding: 40px 16px 28px;
  display: grid;
  gap: 32px;
}

@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1.2fr 2fr;
    padding: 48px 32px 32px;
    gap: 48px;
  }
}

.site-footer__logo {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
}

.site-footer__tagline {
  margin: 12px 0 0;
  max-width: 22rem;
  line-height: 1.55;
  color: #64748b;
}

.site-footer__disclaimer {
  margin: 16px 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
}

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 24px;
}

.site-footer__heading {
  margin: 0 0 12px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
}

.site-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer__col a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer__col a:hover {
  color: #fff;
}

.site-footer__bar {
  border-top: 1px solid rgba(52, 60, 100, 0.35);
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 0.8125rem;
  color: #64748b;
  max-width: var(--site-content-max, 1260px);
  margin: 0 auto;
}

.site-footer__bar-note {
  font-size: 0.75rem;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-page-shell {
  flex: 1;
}

/* Cookie consent */
.cookie-consent {
  position: fixed;
  top: auto;
  right: auto;
  bottom: 84px;
  left: 12px;
  z-index: 80;
  width: min(300px, calc(100vw - 24px));
  max-width: 300px;
  margin: 0;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.35s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.cookie-consent--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (min-width: 960px) {
  .cookie-consent {
    bottom: 88px;
    left: 16px;
    width: min(300px, calc(var(--chat-column-width, 360px) - 32px));
  }
}

.cookie-consent__panel {
  padding: 20px;
  border-radius: 16px;
  background: rgb(18 23 49);
  border: 1px solid rgba(59, 130, 246, 0.35);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.cookie-consent__title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
}

.cookie-consent__text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #94a3b8;
}

.cookie-consent__text a {
  color: #93c5fd;
  text-decoration: underline;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.cookie-consent__btn {
  touch-action: manipulation;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.cookie-consent__btn--primary {
  background: #2563eb;
  color: #fff;
}

.cookie-consent__btn--primary:hover {
  background: #3b82f6;
}

.cookie-consent__btn--ghost {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid rgba(100, 116, 139, 0.5);
}

.cookie-consent__btn--ghost:hover {
  background: rgba(51, 65, 85, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .cookie-consent {
    transition: none;
  }
}

/* ---------- Footer: social + legal row ---------- */
.site-footer__social {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer__social[hidden],
.site-footer__social-link[hidden] {
  display: none !important;
}

.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(100, 116, 139, 0.4);
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.site-footer__social-link:hover,
.site-footer__social-link:focus-visible {
  color: #fff;
  border-color: var(--tb-accent, #2563eb);
  background: rgba(148, 163, 184, 0.08);
}

.site-footer__social-icon {
  display: inline-flex;
  color: #38bdf8;
}

body[data-theme="christmas"] .site-footer__social-icon {
  color: #4ade80;
}

.site-footer__legal {
  max-width: var(--site-content-max, 1260px);
  margin: 0 auto;
  padding: 14px 16px;
  border-top: 1px solid rgba(52, 60, 100, 0.35);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 0.8125rem;
}

.site-footer__legal a {
  color: #cbd5e1;
  text-decoration: none;
}

.site-footer__legal a:hover,
.site-footer__legal a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.site-footer__age {
  font-weight: 800;
  color: #cbd5e1;
}

@media (min-width: 768px) {
  .site-footer__legal {
    padding: 14px 32px;
  }
  .site-footer__bar {
    padding: 16px 32px;
  }
}

/* ---------- Telegram banner ---------- */
.tg-banner {
  position: sticky;
  top: var(--navbar-height, 56px);
  z-index: 100;
  view-transition-name: tide-tg-banner;
  color: #e2e8f0;
  font-size: 0.875rem;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.22), rgba(56, 189, 248, 0.1)),
    var(--tb-header-bg, rgb(12 16 43));
  border-bottom: 1px solid rgba(59, 130, 246, 0.35);
}

body[data-theme="christmas"] .tg-banner {
  background:
    linear-gradient(90deg, rgba(22, 163, 74, 0.26), rgba(220, 38, 38, 0.16)),
    var(--tb-header-bg, rgb(12 16 43));
  border-bottom-color: rgba(22, 163, 74, 0.45);
}

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

.tg-banner__inner {
  max-width: var(--site-content-max, 1260px);
  margin: 0 auto;
  min-height: 40px;
  padding: 6px 8px 6px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tg-banner__content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 12px;
}

.tg-banner__icon {
  display: inline-flex;
  flex-shrink: 0;
  color: #38bdf8;
}

body[data-theme="christmas"] .tg-banner__icon {
  color: #4ade80;
}

.tg-banner__text {
  margin: 0;
  min-width: 0;
  line-height: 1.35;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.tg-banner__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--tb-accent, #2563eb);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: filter 0.15s ease;
}

.tg-banner__cta:hover,
.tg-banner__cta:focus-visible {
  filter: brightness(1.12);
  color: #fff;
}

.tg-banner__cta-icon {
  display: inline-flex;
}

.tg-banner__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.tg-banner__close:hover,
.tg-banner__close:focus-visible {
  color: #fff;
  background: rgba(148, 163, 184, 0.16);
}

/* Desktop: one line (long text is truncated rather than pushing the button down). */
@media (min-width: 768px) {
  .tg-banner__content {
    flex-wrap: nowrap;
  }
  .tg-banner__text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Mobile: wraps cleanly  -  text first, button below it. */
@media (max-width: 767px) {
  .tg-banner {
    font-size: 0.8125rem;
  }
  .tg-banner__inner {
    padding: 6px 4px 6px 12px;
  }
  .tg-banner__content {
    justify-content: flex-start;
  }
  .tg-banner__text {
    flex: 1 1 calc(100% - 30px);
  }
}

/* Keep the sticky chat column below topbar + banner (height is 0 when no banner). */
body .site-chat-column {
  top: calc(var(--navbar-height, 56px) + var(--tg-banner-h, 0px));
  height: calc(100vh - var(--navbar-height, 56px) - var(--tg-banner-h, 0px));
}

/* Admin: preview of the banner (not sticky, not dismissible). */
.tg-banner--preview {
  position: static;
  view-transition-name: none;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 12px;
  overflow: hidden;
}

.tg-banner--preview .tg-banner__close {
  pointer-events: none;
  opacity: 0.6;
}
