/* Vet2Home — consentimento de cookies */
.cookie-consent[hidden],
.cookie-consent__preferences[hidden] {
  display: none !important;
}

.cookie-consent {
  position: relative;
  z-index: 10000;
}

/* Banner compacto: não bloqueia a página e deixa o site utilizável enquanto a pessoa decide. */
.cookie-consent__banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  width: min(1040px, calc(100% - 32px));
  padding: 14px 16px;
  color: #fffaf2;
  background: rgba(12, 20, 23, .985);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 15px;
  box-shadow: 0 16px 42px rgba(0,0,0,.30);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.cookie-consent__copy {
  min-width: 0;
}

.cookie-consent__eyebrow {
  display: inline-block;
  margin: 0 0 2px;
  color: #75c9d7;
  font-family: "Poppins", Arial, sans-serif;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Evita que os estilos grandes dos títulos do site sejam herdados pelo banner. */
.cookie-consent h2,
.cookie-preferences__panel h2 {
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.cookie-consent__copy p {
  max-width: 650px;
  margin: 5px 0 2px;
  color: rgba(255,250,242,.88);
  font-family: "Poppins", Arial, sans-serif;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.45;
  text-shadow: none;
}

.cookie-consent__copy a {
  color: #fffaf2;
  font-family: "Poppins", Arial, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  text-underline-offset: 3px;
}

.cookie-consent__actions,
.cookie-preferences__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.cookie-consent__actions {
  flex-wrap: nowrap;
}

.cookie-btn {
  min-height: 39px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: "Poppins", Arial, sans-serif;
  font-size: .74rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.cookie-btn:hover { transform: translateY(-1px); }
.cookie-btn:focus-visible,
.cookie-preferences__close:focus-visible,
.cookie-settings-link:focus-visible,
.cookie-switch input:focus-visible + span {
  outline: 3px solid rgba(88,184,202,.42);
  outline-offset: 3px;
}

.cookie-btn--primary {
  color: #fff;
  background: #ff7a18;
}
.cookie-btn--primary:hover { background: #ef6d0e; }

.cookie-btn--secondary {
  color: #103f4b;
  background: #fff8ee;
  border-color: #fff8ee;
}
.cookie-btn--secondary:hover { background: #f5eadb; }

.cookie-btn--ghost {
  color: #fffaf2;
  background: transparent;
  border-color: rgba(255,255,255,.34);
}
.cookie-btn--ghost:hover { background: rgba(255,255,255,.08); }

/* Painel de preferências: só este é modal, porque foi aberto voluntariamente. */
.cookie-consent__preferences {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 10, 12, .68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cookie-preferences__panel {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: clamp(22px, 4vw, 34px);
  color: #111214;
  background: #f8f3ea;
  border: 1px solid #e5d9c7;
  border-radius: 22px;
  box-shadow: 0 30px 100px rgba(0,0,0,.38);
}

.cookie-preferences__header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.cookie-preferences__close {
  width: 42px;
  height: 42px;
  border: 1px solid #ddcfbc;
  border-radius: 50%;
  color: #124f5f;
  background: transparent;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.cookie-preference-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid #e3d7c6;
}

.cookie-preference-row strong {
  color: #124f5f;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 1rem;
}

.cookie-preference-row p {
  margin: 5px 0 0;
  color: rgba(17,18,20,.72);
  font-family: "Poppins", Arial, sans-serif;
  font-size: .88rem;
  line-height: 1.5;
}

.cookie-always-on {
  color: rgba(17,18,20,.58);
  font-size: .78rem;
  font-weight: 850;
  white-space: nowrap;
}

.cookie-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}
.cookie-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cookie-switch span {
  position: relative;
  display: block;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #c7c3bb;
  cursor: pointer;
  transition: background .18s ease;
}
.cookie-switch span::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  transition: transform .18s ease;
}
.cookie-switch input:checked + span { background: #2f8da0; }
.cookie-switch input:checked + span::after { transform: translateX(22px); }

.cookie-preferences__actions {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid #e3d7c6;
}
.cookie-preferences__actions .cookie-btn--ghost {
  color: #124f5f;
  border-color: #cdbfae;
}

.cookie-settings-link {
  appearance: none;
  display: inline-block;
  margin: 7px 0 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

@media (max-width: 980px) {
  .cookie-consent__banner {
    grid-template-columns: 1fr;
    gap: 10px;
    width: min(760px, calc(100% - 24px));
    padding: 13px 14px;
  }

  .cookie-consent__actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .cookie-consent__banner {
    bottom: 10px;
    width: calc(100% - 20px);
    padding: 12px;
    border-radius: 13px;
  }

  .cookie-consent__eyebrow { display: none; }
  .cookie-consent h2 { font-size: .94rem; }
  .cookie-consent__copy p { font-size: .73rem; line-height: 1.4; }
  .cookie-consent__copy a { font-size: .68rem; }

  .cookie-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .cookie-consent__actions .cookie-btn--primary {
    grid-column: 1 / -1;
  }

  .cookie-btn {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    font-size: .7rem;
  }

  .cookie-preference-row { gap: 14px; }
  .cookie-preferences__actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .cookie-consent__actions {
    grid-template-columns: 1fr;
  }
  .cookie-consent__actions .cookie-btn--primary { grid-column: auto; }
}

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