/* LGPD — banner e preferências de cookies */

.lgpd[hidden],
.lgpd__overlay[hidden],
.lgpd__panel[hidden],
.lgpd__banner[hidden] {
  display: none !important;
}

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

.lgpd__banner-inner {
  pointer-events: auto;
  width: min(100%, 1120px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 1.5rem;
  align-items: center;
  padding: 1.15rem 1.35rem;
  background: color-mix(in srgb, #fffdfb 94%, transparent);
  border: 1px solid rgba(58, 36, 23, 0.14);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(26, 18, 13, 0.22);
  backdrop-filter: blur(10px);
}

.lgpd__title {
  margin: 0 0 0.35rem;
  font-family: "Bricolage Grotesque", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink, #1a120d);
}

.lgpd__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted, #6b5a4c);
}

.lgpd__text a {
  color: var(--bronze-deep, #9a6a2e);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lgpd__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.lgpd__btn {
  appearance: none;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.lgpd__btn:hover {
  transform: translateY(-1px);
}

.lgpd__btn--primary {
  background: linear-gradient(135deg, var(--bronze, #c4893f), var(--bronze-deep, #9a6a2e));
  color: #fffdfb;
}

.lgpd__btn--outline {
  background: transparent;
  border-color: rgba(58, 36, 23, 0.28);
  color: var(--ink, #1a120d);
}

.lgpd__btn--ghost {
  background: transparent;
  color: var(--ink-soft, #3b2417);
}

.lgpd__overlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: rgba(26, 18, 13, 0.45);
}

.lgpd__panel {
  position: fixed;
  z-index: 10070;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(calc(100% - 2rem), 520px);
  max-height: min(88vh, 640px);
  display: flex;
  flex-direction: column;
  background: #fffdfb;
  border-radius: 18px;
  border: 1px solid rgba(58, 36, 23, 0.12);
  box-shadow: 0 28px 70px rgba(26, 18, 13, 0.28);
  overflow: hidden;
}

.lgpd__panel-head,
.lgpd__panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(58, 36, 23, 0.1);
}

.lgpd__panel-foot {
  border-bottom: 0;
  border-top: 1px solid rgba(58, 36, 23, 0.1);
  flex-wrap: wrap;
}

.lgpd__panel-head h2 {
  margin: 0;
  font-family: "Bricolage Grotesque", Georgia, serif;
  font-size: 1.25rem;
  color: var(--ink, #1a120d);
}

.lgpd__close {
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: rgba(58, 36, 23, 0.08);
  color: var(--ink, #1a120d);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.lgpd__panel-body {
  padding: 1rem 1.25rem 1.25rem;
  overflow: auto;
}

.lgpd__panel-lead {
  margin: 0 0 1rem;
  color: var(--muted, #6b5a4c);
  font-size: 0.95rem;
  line-height: 1.55;
}

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

.lgpd__cat {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(58, 36, 23, 0.12);
  border-radius: 14px;
  background: var(--mist, #faf6f1);
}

.lgpd__cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.lgpd__cat strong {
  color: var(--ink, #1a120d);
}

.lgpd__cat p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted, #6b5a4c);
}

.lgpd__badge {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(196, 137, 63, 0.18);
  color: var(--bronze-deep, #9a6a2e);
  vertical-align: middle;
}

.lgpd__switch {
  position: relative;
  width: 46px;
  height: 28px;
  flex-shrink: 0;
}

.lgpd__switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.lgpd__switch span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(58, 36, 23, 0.2);
  transition: background 0.2s ease;
}

.lgpd__switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(26, 18, 13, 0.2);
  transition: transform 0.2s ease;
}

.lgpd__switch input:checked + span {
  background: linear-gradient(135deg, var(--bronze, #c4893f), var(--bronze-deep, #9a6a2e));
}

.lgpd__switch input:checked + span::after {
  transform: translateX(18px);
}

.lgpd__switch--locked input {
  cursor: not-allowed;
}

.lgpd__switch--locked input:checked + span {
  opacity: 0.85;
}

.lgpd__policy-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--bronze-deep, #9a6a2e);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lgpd__reopen {
  position: fixed;
  z-index: 10040;
  left: 1rem;
  bottom: 1rem;
  border: 1px solid rgba(58, 36, 23, 0.16);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: color-mix(in srgb, #fffdfb 92%, transparent);
  color: var(--ink-soft, #3b2417);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(26, 18, 13, 0.16);
  backdrop-filter: blur(8px);
}

.lgpd__reopen:hover {
  border-color: var(--bronze, #c4893f);
}

html.lgpd-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .lgpd__banner {
    padding: 0.75rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .lgpd__banner-inner {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .lgpd__actions {
    justify-content: stretch;
  }

  .lgpd__btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .lgpd__reopen {
    left: 0.75rem;
    bottom: 5.5rem;
  }

  .lgpd__actions--panel {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lgpd__btn,
  .lgpd__switch span,
  .lgpd__switch span::after {
    transition: none;
  }
}
