/* Cookie consent — primary CTA only prominent; other choices as subtle links */
:root {
  --cc-brand: #e30613;
  --cc-brand-dark: #b8050f;
  --cc-white: #ffffff;
  --cc-text-muted: rgba(255, 255, 255, 0.92);
}

.cookie-consent {
  position: fixed;
  z-index: 100050;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 12px 10px;
  background: var(--cc-brand);
  color: var(--cc-white);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.2);
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.35;
  pointer-events: auto;
  isolation: isolate;
  border-radius: 10px 10px 0 0;
  /* Hug content; avoid min(38vh,200px) + flex quirks stretching the bar on mobile */
  max-height: none;
  overflow: visible;
  -webkit-overflow-scrolling: touch;
}

.cookie-consent--hidden {
  display: none !important;
}

.cookie-consent__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* One row: copy + single primary button */
.cookie-consent__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  justify-content: space-between;
}

.cookie-consent__text {
  flex: 1 1 180px;
  margin: 0;
  min-width: 0;
}

.cookie-consent__summary {
  margin: 0;
  color: var(--cc-text-muted);
  font-size: 11px;
}

.cookie-consent__text a {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent__title {
  margin: 0 0 2px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--cc-white);
  letter-spacing: 0.02em;
}

.cookie-consent__cta {
  flex: 0 0 auto;
}

/* Main action — only strong button */
.cookie-consent__btn-primary {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  padding: 9px 18px;
  border: none;
  background: var(--cc-white);
  color: var(--cc-brand);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.cookie-consent__btn-primary:hover {
  background: #fff5f5;
  color: var(--cc-brand-dark);
}

.cookie-consent__btn-primary:active {
  transform: scale(0.98);
}

/* Secondary choices — look like text links, not competing buttons */
.cookie-consent__subactions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 2px 6px;
  width: 100%;
  padding-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.cookie-consent__sep {
  color: rgba(255, 255, 255, 0.35);
  user-select: none;
  padding: 0 2px;
}

.cookie-consent__link {
  font-family: inherit;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 2px;
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: underline;
  text-underline-offset: 2px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease;
}

.cookie-consent__link:hover {
  color: rgba(255, 255, 255, 0.9);
}

.cookie-consent__link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Visibility via class */
.cookie-consent__details {
  display: none !important;
  width: 100%;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-consent__details.cookie-consent__details--open {
  display: block !important;
}

.cookie-consent.cookie-consent--panel-open {
  max-height: min(72vh, 420px);
  overflow-y: auto;
}

.cookie-consent__details-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cookie-consent__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.cookie-consent__row label {
  cursor: pointer;
  flex: 1;
  color: var(--cc-text-muted);
  font-size: 11px;
}

.cookie-consent__row input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--cc-white);
  flex-shrink: 0;
  cursor: pointer;
}

.cookie-consent__row input[type="checkbox"]:disabled {
  opacity: 0.7;
}

.cookie-consent__hint {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 1px;
}

.cookie-consent__details .cookie-consent__btn-primary {
  align-self: flex-start;
  margin-top: 4px;
  font-size: 12px;
  padding: 7px 14px;
}

@media (min-width: 768px) {
  .cookie-consent.cookie-consent--panel-open {
    max-height: none;
  }

  .cookie-consent {
    padding: 10px 18px 12px;
    max-height: none;
    overflow: visible;
  }

  .cookie-consent__title {
    font-size: 13px;
  }

  .cookie-consent__summary {
    font-size: 12px;
  }

  .cookie-consent__btn-primary {
    font-size: 14px;
    padding: 10px 22px;
  }

  .cookie-consent__link {
    font-size: 11px;
  }
}

@media (max-width: 767px) {
  /* In column layout, flex-basis 180px on __text becomes HEIGHT and creates a huge empty gap */
  .cookie-consent__text {
    flex: 0 1 auto;
    flex-basis: auto;
    min-height: 0;
  }

  .cookie-consent__main {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .cookie-consent__cta {
    width: 100%;
    flex: 0 0 auto;
  }

  .cookie-consent__cta .cookie-consent__btn-primary {
    width: 100%;
    text-align: center;
  }

  .cookie-consent__subactions {
    justify-content: center;
    padding-top: 4px;
  }
}
