/*
 * cookie-consent.css — banner + preferences modal.
 * Matches the landing design system: black surfaces, white text, pill buttons,
 * Golos Text, white :focus-visible outlines. Accept all / Reject all are visually
 * identical (AEPD: reject must not be less prominent than accept).
 */

.cc-banner,
.cc-modal,
.cc-banner *,
.cc-modal * {
  box-sizing: border-box;
}

/* ---- Banner ---- */
.cc-banner {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 110%);
  width: min(1100px, calc(100% - 32px));
  margin-bottom: 16px;
  z-index: 99990;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-family: 'Golos Text', sans-serif;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.cc-banner--in {
  transform: translate(-50%, 0);
}
.cc-banner__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 24px 28px;
}
.cc-banner__title {
  font-size: 16pt;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 6px;
}
.cc-banner__desc {
  font-size: 11pt;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}
.cc-banner__actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.cc-link {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cc-link:hover {
  opacity: 0.8;
}

/* ---- Buttons (equal weight) ---- */
.cc-btn {
  font-family: 'Golos Text', sans-serif;
  font-size: 11pt;
  font-weight: 500;
  line-height: 1;
  padding: 14px 22px;
  min-width: 132px;
  border-radius: 50px;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.cc-btn:hover {
  transform: translateY(-1px);
}
.cc-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}
/* Accept all and Reject all are intentionally identical. */
.cc-btn--accept,
.cc-btn--reject {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}
.cc-btn--accept:hover,
.cc-btn--reject:hover {
  background: #ececec;
  border-color: #ececec;
}
/* Configure / Save — same size, outline variant (still fully legible). */
.cc-btn--configure,
.cc-btn--save {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
}
.cc-btn--configure:hover,
.cc-btn--save:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.cc-btn--save {
  background: #39b54a;
  color: #ffffff;
  border-color: #39b54a;
}
.cc-btn--save:hover {
  background: #2f9c3e;
  border-color: #2f9c3e;
}

/* ---- Modal ---- */
.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.cc-modal--in {
  opacity: 1;
}
.cc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
}
.cc-modal__panel {
  position: relative;
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 32px 32px 28px;
  color: #ffffff;
  font-family: 'Golos Text', sans-serif;
  transform: translateY(12px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.cc-modal--in .cc-modal__panel {
  transform: translateY(0);
}
.cc-modal__close {
  position: absolute;
  top: 18px;
  right: 20px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.cc-modal__close:hover {
  color: #ffffff;
}
.cc-modal__close:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  border-radius: 6px;
}
.cc-modal__title {
  font-size: 18pt;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 10px;
  padding-right: 28px;
}
.cc-modal__desc {
  font-size: 11pt;
  line-height: 1.4;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
}

/* ---- Categories ---- */
.cc-cats {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
}
.cc-cat {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.cc-cat:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.cc-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}
.cc-cat__name {
  font-size: 12pt;
  font-weight: 600;
}
.cc-cat__always {
  font-size: 10pt;
  font-weight: 500;
  color: #39b54a;
  white-space: nowrap;
}
.cc-cat__desc {
  font-size: 10.5pt;
  line-height: 1.4;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

/* ---- Toggle switch ---- */
.cc-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}
.cc-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.cc-switch__slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 26px;
  transition: background 0.2s ease;
}
.cc-switch__slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.cc-switch input:checked + .cc-switch__slider {
  background: #39b54a;
}
.cc-switch input:checked + .cc-switch__slider::before {
  transform: translateX(20px);
}
.cc-switch input:focus-visible + .cc-switch__slider {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.cc-modal__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---- Responsive ---- */
@media (max-width: 820px) {
  .cc-banner__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 22px;
  }
  .cc-banner__actions {
    flex-wrap: wrap;
  }
  .cc-btn {
    flex: 1 1 auto;
  }
  .cc-modal__actions {
    justify-content: stretch;
  }
  .cc-modal__actions .cc-btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner,
  .cc-modal,
  .cc-modal__panel,
  .cc-btn {
    transition: none;
  }
}
