/**
 * Ortak onay paneli.
 *
 * Renkler tema tarafından `--chn-consent-*` değişkenleriyle değiştirilebilir;
 * hiçbir markaya özel değer gömülmemiştir. Kabul ve ret düğmeleri aynı
 * boyutta ve aynı erişilebilirliktedir.
 */

:root {
  --chn-consent-bg: #211026;
  --chn-consent-fg: #fff;
  --chn-consent-muted: rgb(255 255 255/76%);
  --chn-consent-border: rgb(255 255 255/14%);
  --chn-consent-allow-bg: #fff;
  --chn-consent-allow-fg: #211026;
  --chn-consent-radius: 0.65rem;
}

.chn-consent {
  position: fixed;
  bottom: 1.1rem;
  left: 1.1rem;
  z-index: 170;
  display: grid;
  width: min(40rem, calc(100vw - 2.2rem));
  padding: 1rem 1.05rem;
  border: 1px solid var(--chn-consent-border);
  border-radius: var(--chn-consent-radius);
  background: var(--chn-consent-bg);
  box-shadow: 0 18px 55px rgb(24 8 28/25%);
  color: var(--chn-consent-fg);
  opacity: 0;
  transform: translateY(1.2rem);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
  gap: 0.85rem;
}

.chn-consent[hidden] {
  display: none !important;
}

.chn-consent.is-open {
  opacity: 1;
  transform: translateY(0);
}

.chn-consent__text strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
}

.chn-consent__text p {
  margin: 0;
  color: var(--chn-consent-muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.chn-consent__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.chn-consent__actions button,
.chn-consent__actions a {
  min-height: 2.25rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--chn-consent-border);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.74rem;
  cursor: pointer;
  text-decoration: none;
}

.chn-consent__allow {
  border-color: var(--chn-consent-allow-bg) !important;
  background: var(--chn-consent-allow-bg) !important;
  color: var(--chn-consent-allow-fg) !important;
  font-weight: 600;
}

.chn-consent__actions button:focus-visible,
.chn-consent__actions a:focus-visible {
  outline: 2px solid var(--chn-consent-allow-bg);
  outline-offset: 2px;
}

@media (min-width: 54rem) {
  .chn-consent {
    grid-template-columns: minmax(16rem, 1fr) auto;
    align-items: center;
    gap: 1rem;
  }

  .chn-consent__actions {
    justify-content: flex-end;
  }
}

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