/* 3G Tapeçaria — Consent Mode V2 UI. Scoped to avoid generic site rules. */
.consent-banner-v1 {
  position: fixed;
  right: 16px;
  bottom: 76px;
  z-index: 10000;
  width: min(860px, calc(100vw - 32px));
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(45, 45, 45, 0.16);
}

.consent-banner-v1[hidden],
.consent-dialog-v1[hidden] {
  display: none;
}

.consent-banner-v1__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 14px 18px;
}

.consent-banner-v1__title {
  margin: 0 0 4px;
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.consent-dialog-v1 h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
}

.consent-banner-v1__message,
.consent-dialog-v1__form > p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.consent-banner-v1__actions,
.consent-dialog-v1__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.consent-action-v1 {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 9px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.consent-action-v1--accept {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

.consent-action-v1--accept:hover {
  background: #57321f;
}

.consent-action-v1--reject {
  border-color: rgba(107, 63, 42, 0.45);
  background: #fff;
  color: var(--color-primary);
}

.consent-action-v1--reject:hover {
  border-color: var(--color-primary);
  background: var(--color-bg-alt);
}

.consent-action-v1--preferences {
  border-color: transparent;
  background: transparent;
  color: var(--color-primary);
  padding-right: 4px;
  padding-left: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent-action-v1--preferences:hover {
  color: #57321f;
}

.consent-link-v1 {
  border: 0;
  padding: 6px 0;
  background: transparent;
  color: var(--color-primary);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent-link-v1:focus-visible,
.consent-action-v1:focus-visible,
.consent-dialog-v1__close:focus-visible,
.consent-preferences-v1 button:focus-visible {
  outline: 3px solid rgba(201, 169, 110, 0.85);
  outline-offset: 3px;
}

.consent-dialog-v1 {
  width: min(560px, calc(100vw - 28px));
  max-width: 560px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
}

.consent-dialog-v1::backdrop {
  background: rgba(31, 29, 27, 0.52);
}

.consent-dialog-v1__form {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.consent-dialog-v1__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.consent-dialog-v1__close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: #fff;
  color: var(--color-primary);
  font-size: 1.5rem;
  line-height: 1;
}

.consent-dialog-v1__fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.consent-dialog-v1__fieldset legend {
  margin-bottom: 4px;
  color: var(--color-primary);
  font-weight: 800;
}

.consent-option-v1 {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 11px 14px;
  cursor: pointer;
}

.consent-option-v1 span {
  display: grid;
  gap: 2px;
}

.consent-option-v1 small {
  color: var(--color-muted);
  font-size: 0.82rem;
}

.consent-option-v1 input {
  width: 20px;
  height: 20px;
  accent-color: var(--color-primary);
}

.consent-option-v1--locked {
  background: var(--color-bg-alt);
  cursor: default;
}

.consent-preferences-v1 {
  padding: 8px 16px 18px;
  text-align: center;
}

.consent-preferences-v1 button {
  border: 0;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 700px) {
  .consent-banner-v1 {
    right: 10px;
    bottom: 76px;
    width: calc(100vw - 20px);
  }

  .consent-banner-v1__inner {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 13px 14px;
  }

  .consent-banner-v1__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    justify-content: stretch;
  }

  .consent-banner-v1__actions .consent-action-v1 {
    width: 100%;
    min-height: 44px;
    padding-right: 5px;
    padding-left: 5px;
    font-size: 0.79rem;
  }

  .consent-banner-v1__message {
    font-size: 0.86rem;
  }

  .consent-dialog-v1__form {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent-banner-v1 *,
  .consent-dialog-v1 * {
    scroll-behavior: auto;
    transition: none !important;
  }
}
