/* TPV cookie & storage preferences — non-blocking bottom banner (visual only) */

:root {
  --tpv-c-navy: #002b45;
  --tpv-c-navy-btn: #00324e;
  --tpv-c-navy-text: #061d33;
  --tpv-c-gold: #f4a62a;
  --tpv-c-gold-soft: #fff4e3;
  --tpv-c-muted: #5b6b7b;
  --tpv-c-border: #e8eef3;
  --tpv-c-surface: #f3f6f9;
  --tpv-c-white: #ffffff;
  --tpv-c-blue: #1d6bb8;
}

.tpv-consent {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  top: auto;
  z-index: 100000;
  display: block;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: transparent;
  pointer-events: none;
  font-family: inherit;
  animation: tpv-consent-banner-in 200ms ease-out;
}

@keyframes tpv-consent-banner-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tpv-consent__sheet {
  pointer-events: auto;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  max-height: min(70vh, 720px);
  overflow: auto;
  background: var(--tpv-c-white);
  color: var(--tpv-c-navy-text);
  border-radius: 22px;
  border: 1px solid rgba(0, 43, 69, 0.1);
  padding: 24px 28px;
  box-shadow:
    0 4px 6px rgba(6, 29, 51, 0.04),
    0 18px 40px rgba(6, 29, 51, 0.14);
  box-sizing: border-box;
}

.tpv-consent__banner-row {
  display: flex;
  align-items: center;
  gap: 28px;
}

.tpv-consent__banner-copy {
  flex: 1 1 60%;
  min-width: 0;
}

.tpv-consent__banner-side {
  flex: 0 1 40%;
  min-width: 280px;
}

.tpv-consent__header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 0;
}

.tpv-consent__icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--tpv-c-gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tpv-c-gold);
}

.tpv-consent__icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.tpv-consent__intro {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.tpv-consent__title {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 1.5vw, 1.45rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--tpv-c-navy);
}

.tpv-consent__text {
  margin: 0;
  max-width: 46em;
  font-size: clamp(0.95rem, 1.05vw, 1.05rem);
  line-height: 1.5;
  color: var(--tpv-c-muted);
  font-weight: 400;
}

.tpv-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
}

.tpv-consent__actions--banner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.tpv-consent__actions--settings {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.tpv-consent__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 0.7rem 1.1rem;
  border-radius: 13px;
  border: 1.5px solid transparent;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease,
    border-color 140ms ease;
  box-sizing: border-box;
}

.tpv-consent__btn:focus-visible {
  outline: 3px solid var(--tpv-c-gold);
  outline-offset: 3px;
}

.tpv-consent__btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.tpv-consent__btn--accept {
  background: var(--tpv-c-navy);
  color: var(--tpv-c-white);
  border-color: var(--tpv-c-navy);
  box-shadow: 0 6px 16px rgba(0, 43, 69, 0.2);
}

.tpv-consent__btn--accept svg {
  color: var(--tpv-c-gold);
}

.tpv-consent__btn--accept:hover {
  background: var(--tpv-c-navy-btn);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 43, 69, 0.26);
}

.tpv-consent__btn--reject {
  background: var(--tpv-c-white);
  color: var(--tpv-c-navy);
  border-color: var(--tpv-c-navy);
}

.tpv-consent__btn--reject svg {
  color: #7a8fa0;
}

.tpv-consent__btn--reject:hover {
  background: #f7fafc;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 43, 69, 0.1);
}

.tpv-consent__btn--config {
  background: var(--tpv-c-surface);
  color: var(--tpv-c-navy);
  border-color: transparent;
  font-weight: 700;
  min-height: 48px;
}

.tpv-consent__btn--config svg {
  color: var(--tpv-c-navy);
}

.tpv-consent__btn--config:hover {
  background: #e8eef3;
  transform: translateY(-1px);
}

.tpv-consent__btn--ghost {
  background: transparent;
  color: var(--tpv-c-muted);
  border-color: var(--tpv-c-border);
  min-height: 44px;
  font-weight: 600;
  font-size: 0.92rem;
  width: auto;
}

.tpv-consent__btn--ghost:hover {
  background: var(--tpv-c-surface);
  color: var(--tpv-c-navy);
}

.tpv-consent__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.tpv-consent__banner-copy .tpv-consent__footer {
  margin-top: 12px;
  padding-top: 0;
  border-top: 0;
}

.tpv-consent__privacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  max-width: 36rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--tpv-c-muted);
}

.tpv-consent__privacy svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--tpv-c-gold);
}

.tpv-consent__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tpv-c-blue);
  text-decoration: none;
  white-space: nowrap;
}

.tpv-consent__more:hover {
  text-decoration: underline;
}

.tpv-consent__more:focus-visible {
  outline: 3px solid var(--tpv-c-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.tpv-consent__more svg {
  width: 14px;
  height: 14px;
}

.tpv-consent__policy {
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--tpv-c-muted);
}

.tpv-consent__policy a {
  color: var(--tpv-c-blue);
  font-weight: 600;
}

.tpv-consent__settings .tpv-consent__header {
  margin-bottom: 12px;
}

.tpv-consent__cats {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.tpv-consent__cats li {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border: 1px solid var(--tpv-c-border);
  border-radius: 12px;
  background: #fafbfc;
}

.tpv-consent__cats strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--tpv-c-navy);
}

.tpv-consent__cats p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--tpv-c-muted);
}

.tpv-consent__lock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.tpv-consent__lock-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--tpv-c-navy);
  background: #e8f1f5;
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}

.tpv-consent__switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.tpv-consent__switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.tpv-consent__slider {
  position: absolute;
  inset: 0;
  background: #c5d3da;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tpv-consent__slider::before {
  content: '';
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 3px rgba(6, 29, 51, 0.2);
}

.tpv-consent__switch input:checked + .tpv-consent__slider {
  background: var(--tpv-c-navy);
}

.tpv-consent__switch input:checked + .tpv-consent__slider::before {
  transform: translateX(20px);
}

.tpv-consent__switch input:disabled + .tpv-consent__slider {
  background: var(--tpv-c-navy);
  opacity: 0.85;
  cursor: not-allowed;
}

.tpv-consent__switch input:focus-visible + .tpv-consent__slider {
  outline: 2px solid var(--tpv-c-gold);
  outline-offset: 2px;
}

.tpv-embed-gate {
  border: 1px solid #dce5ec;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  background: #ffffff;
  color: var(--tpv-c-navy);
  margin: 0.75rem 0;
  box-sizing: border-box;
}

.tpv-embed-gate--cal {
  padding: 32px;
  background: #fbfcfd;
  border: 1px solid #dce5ec;
  border-radius: 16px;
  max-width: 720px;
  margin-inline: auto;
}

.tpv-embed-gate__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--tpv-c-gold-soft);
  color: var(--tpv-c-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tpv-embed-gate__icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.tpv-embed-gate__title {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--tpv-c-navy);
}

.tpv-embed-gate__text,
.tpv-embed-gate p {
  margin: 0 auto 20px;
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--tpv-c-muted);
}

.tpv-embed-gate__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.8rem 1.4rem;
  border: 0;
  border-radius: 13px;
  background: var(--tpv-c-navy);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 43, 69, 0.2);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.tpv-embed-gate__btn:hover {
  background: var(--tpv-c-navy-btn);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(0, 43, 69, 0.26);
}

.tpv-embed-gate__btn:focus-visible {
  outline: 3px solid var(--tpv-c-gold);
  outline-offset: 3px;
}

.tpv-embed-gate__prefs {
  display: inline-flex;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tpv-c-blue);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tpv-embed-gate__prefs:hover {
  color: var(--tpv-c-navy);
}

.tpv-embed-gate__prefs:focus-visible {
  outline: 3px solid var(--tpv-c-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .tpv-consent__actions--settings {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .tpv-consent {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .tpv-consent__sheet {
    max-width: none;
    max-height: min(78vh, 640px);
    padding: 18px;
    border-radius: 18px;
  }

  .tpv-consent__banner-row {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .tpv-consent__banner-copy,
  .tpv-consent__banner-side {
    flex: 1 1 auto;
    min-width: 0;
  }

  .tpv-consent__header {
    gap: 12px;
  }

  .tpv-consent__icon {
    width: 48px;
    height: 48px;
  }

  .tpv-consent__icon svg {
    width: 24px;
    height: 24px;
  }

  .tpv-consent__title {
    font-size: 1.2rem;
  }

  .tpv-consent__text {
    font-size: 0.95rem;
  }

  .tpv-consent__actions--banner,
  .tpv-consent__actions--settings {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .tpv-consent__btn {
    width: 100%;
    min-height: 48px;
    font-size: 0.95rem;
  }

  .tpv-consent__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
  }

  .tpv-consent__cats li {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .tpv-consent__lock {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (max-width: 360px) {
  .tpv-consent {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }

  .tpv-consent__sheet {
    padding: 16px;
  }

  .tpv-consent__title {
    font-size: 1.1rem;
  }

  .tpv-consent__btn {
    min-height: 46px;
    padding: 0.65rem 0.9rem;
    font-size: 0.92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tpv-consent,
  .tpv-consent__sheet,
  .tpv-consent__btn {
    animation: none;
    transition: none;
  }
}
