/* Metron Web Ajans — cookie consent UI (home-v2 palette) */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  padding: 1rem;
  pointer-events: none;
}

.cookie-consent__inner {
  pointer-events: auto;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(120, 170, 220, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(12, 26, 46, 0.96), rgba(5, 11, 20, 0.98));
  box-shadow: 0 18px 50px rgba(0, 12, 28, 0.45);
  color: #a8b8cc;
}

.cookie-consent__title {
  margin: 0 0 0.4rem;
  font-family: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 650;
  color: #f2f6fb;
}

.cookie-consent__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.cookie-consent__policy {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
}

.cookie-consent__policy a {
  color: #4dc3ff;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.cookie-consent__policy a:hover,
.cookie-consent__policy a:focus-visible {
  color: #f2f6fb;
}

.cookie-consent__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.cookie-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 168, 255, 0.35);
  background: rgba(12, 26, 46, 0.7);
  color: #f2f6fb;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cookie-btn--equal {
  width: 100%;
}

.cookie-btn:hover {
  background: rgba(0, 168, 255, 0.14);
  border-color: rgba(0, 168, 255, 0.55);
  color: #f2f6fb;
}

.cookie-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.45);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.15rem;
  align-items: center;
}

.footer-legal a,
.footer-legal button {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  color: #7e92ab;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
}

.footer-legal a:hover,
.footer-legal button:hover,
.footer-legal a:focus-visible,
.footer-legal button:focus-visible {
  color: #4dc3ff;
}

.footer-legal a:focus-visible,
.footer-legal button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.45);
  border-radius: 4px;
}

.cookie-prefs {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

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

.cookie-prefs__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 16, 0.62);
}

.cookie-prefs__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 540px);
  max-height: min(86vh, 640px);
  overflow: auto;
  padding: 1.25rem;
  border-radius: 18px;
  border: 1px solid rgba(120, 170, 220, 0.22);
  background: linear-gradient(180deg, #0c1a2e, #050b14);
  box-shadow: 0 24px 60px rgba(0, 10, 24, 0.55);
  color: #a8b8cc;
}

.cookie-prefs__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cookie-prefs__title {
  margin: 0;
  font-family: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: 1.2rem;
  color: #f2f6fb;
}

.cookie-prefs__close {
  appearance: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  border: 1px solid rgba(120, 170, 220, 0.22);
  background: transparent;
  color: #f2f6fb;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.cookie-prefs__close:focus-visible,
.cookie-switch input:focus-visible + .cookie-switch__ui {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.45);
}

.cookie-prefs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.cookie-prefs__item {
  padding: 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(120, 170, 220, 0.16);
  background: rgba(7, 17, 31, 0.7);
}

.cookie-prefs__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-prefs__name {
  margin: 0 0 0.25rem;
  color: #f2f6fb;
  font-weight: 650;
}

.cookie-prefs__desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.cookie-prefs__locked {
  flex-shrink: 0;
  min-width: 3.5rem;
  text-align: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(62, 207, 142, 0.35);
  color: #3ecf8e;
  font-size: 0.82rem;
  font-weight: 650;
}

.cookie-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

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

.cookie-switch__ui {
  width: 3rem;
  height: 1.7rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 170, 220, 0.28);
  background: rgba(7, 17, 31, 0.9);
  display: inline-block;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cookie-switch__ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: #a8b8cc;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cookie-switch input:checked + .cookie-switch__ui {
  background: rgba(0, 168, 255, 0.28);
  border-color: rgba(0, 168, 255, 0.55);
}

.cookie-switch input:checked + .cookie-switch__ui::after {
  transform: translateX(1.25rem);
  background: #4dc3ff;
}

.cookie-prefs__actions {
  margin-top: 1.1rem;
}

.cookie-prefs__actions .cookie-btn {
  width: 100%;
}

body.cookie-prefs-open {
  overflow: hidden;
}

@media (min-width: 820px) {
  .cookie-consent__inner {
    grid-template-columns: 1.5fr 1fr;
    gap: 1.25rem;
  }

  .cookie-prefs {
    align-items: center;
  }
}

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

  .cookie-consent__actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-btn,
  .cookie-switch__ui,
  .cookie-switch__ui::after {
    transition: none;
  }
}
