﻿/* Cookie consent banner styles */
:root {
  --consent-bg: #f7f1e6;
  --consent-text: #0f172a;
  --consent-muted: #475569;
  --consent-accent: #f97316;
  --consent-border: rgba(15, 23, 42, 0.15);
  --consent-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
}

.cookie-consent {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
  font-family: inherit;
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.cookie-consent__dialog {
  position: relative;
  width: min(720px, 100%);
  border-radius: 20px;
  background: var(--consent-bg);
  color: var(--consent-text);
  box-shadow: var(--consent-shadow);
  border: 1px solid var(--consent-border);
  padding: 24px 24px 20px;
  display: grid;
  gap: 16px;
}

.cookie-consent__title {
  font-size: 1.35rem;
  font-weight: 700;
}

.cookie-consent__text {
  color: var(--consent-muted);
  line-height: 1.5;
}

.cookie-consent__link {
  color: var(--consent-accent);
  font-weight: 600;
  text-decoration: none;
}

.cookie-consent__link:hover {
  text-decoration: underline;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cookie-consent__button {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cookie-consent__button:focus-visible,
.cookie-consent__close:focus-visible,
.cookie-consent__toggle input:focus-visible + .cookie-consent__switch {
  outline: 2px solid var(--consent-accent);
  outline-offset: 2px;
}

.cookie-consent__button:hover {
  transform: translateY(-1px);
}

.cookie-consent__button--primary {
  background: var(--consent-accent);
  color: #1f2937;
}

.cookie-consent__button--secondary {
  background: #e2e8f0;
  border-color: #cbd5f5;
  color: #0f172a;
}

.cookie-consent__button--ghost {
  background: transparent;
  border-color: var(--consent-border);
  color: var(--consent-text);
}

.cookie-consent__button--muted {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.cookie-consent__close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--consent-muted);
}

.cookie-consent__close::before,
.cookie-consent__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background: currentColor;
  transform-origin: center;
}

.cookie-consent__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.cookie-consent__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.cookie-consent__view[hidden] {
  display: none;
}

.cookie-consent__section {
  display: grid;
  gap: 12px;
}

.cookie-consent__category {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--consent-border);
  background: #fffaf3;
}

.cookie-consent__category-title {
  font-weight: 600;
}

.cookie-consent__category-desc {
  color: var(--consent-muted);
  font-size: 0.9rem;
}

.cookie-consent__toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cookie-consent__toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.cookie-consent__switch {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #e2e8f0;
  position: relative;
  transition: background 0.2s ease;
  display: inline-flex;
}

.cookie-consent__switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease;
}

.cookie-consent__toggle input:checked + .cookie-consent__switch {
  background: #22c55e;
}

.cookie-consent__toggle input:checked + .cookie-consent__switch::after {
  transform: translateX(20px);
}

.cookie-consent__toggle input:disabled + .cookie-consent__switch {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-consent__footer-link {
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  padding: 0;
}

@media (max-width: 640px) {
  .cookie-consent {
    padding: 16px;
  }

  .cookie-consent__dialog {
    padding: 20px 18px 18px;
  }

  .cookie-consent__actions {
    flex-direction: column;
  }
}
