/* Sites can set these --bbt-* variables on :root or on #bbt-consent. */
.bbt-consent {
  position: fixed;
  z-index: 2147483000;
  inset: auto auto 24px 24px;
  width: min(440px, calc(100vw - 48px));
  color: var(--bbt-text, #202428);
  font-family: var(--bbt-font-family, inherit);
  font-size: 16px;
  line-height: 1.5;
}

.bbt-consent[hidden], .bbt-consent [hidden] { display: none !important; }

.bbt-panel {
  box-sizing: border-box;
  width: 100%;
  max-height: min(82vh, 720px);
  overflow-y: auto;
  padding: 28px;
  border: 1px solid var(--bbt-panel-border, #dedede);
  border-radius: var(--bbt-radius, 8px);
  background: var(--bbt-surface, #fff);
}

.bbt-panel h2 {
  margin: 0 0 12px;
  color: var(--bbt-text, #202428);
  font-family: inherit;
  font-size: clamp(22px, 2.2vw, 27px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.bbt-panel p {
  margin: 0 0 22px;
  color: var(--bbt-text, #202428);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.55;
}

.bbt-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bbt-actions button {
  min-height: 46px;
  padding: 10px 13px;
  border: 2px solid var(--bbt-border, #202428);
  border-radius: var(--bbt-radius, 8px);
  background: transparent;
  color: var(--bbt-text, #202428);
  font-family: var(--bbt-font-family, inherit);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  text-align: center;
}

.bbt-actions [data-bbt-action="accept"],
.bbt-actions [data-bbt-action="reject"],
.bbt-actions [data-bbt-action="save"] {
  border-color: var(--bbt-button, #202428);
  background: var(--bbt-button, #202428);
  color: var(--bbt-button-text, #fff);
}

.bbt-actions [data-bbt-action="reject"] { grid-column: 1 / -1; }
.bbt-is-customizing .bbt-actions [data-bbt-action="reject"] { grid-column: 1; grid-row: 1; }
.bbt-is-customizing .bbt-actions [data-bbt-action="accept"] { grid-column: 2; grid-row: 1; }
.bbt-is-customizing .bbt-actions [data-bbt-action="save"] { grid-column: 1 / -1; grid-row: 2; }

.bbt-actions button:hover { filter: brightness(.94); }
.bbt-actions button:active { transform: translateY(1px); }
.bbt-actions button:focus-visible,
.bbt-panel a:focus-visible,
.bbt-choice:focus-visible,
.bbt-footer-button:focus-visible {
  outline: 3px solid var(--bbt-focus, #1769aa);
  outline-offset: 3px;
}

.bbt-panel .bbt-privacy-line { margin: -10px 0 22px; font-size: 14px; }
.bbt-privacy {
  display: inline;
  color: var(--bbt-text, #202428);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bbt-preferences { display: grid; gap: 10px; margin: 0 0 20px; }
.bbt-choice {
  box-sizing: border-box;
  display: block;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--bbt-border, var(--bbt-button, #202428));
  border-radius: var(--bbt-radius, 8px);
  background: transparent;
  color: var(--bbt-text, #202428);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}
.bbt-choice span { display: block; }
.bbt-choice small { display: block; margin: 3px 0 0; color: inherit; font-size: 13px; font-weight: 400; opacity: .85; }
button.bbt-choice { cursor: pointer; }
button.bbt-choice:hover:not(.is-selected) { background: var(--bbt-hover, #f4f4f4); }
.bbt-choice.is-selected {
  border: 2px solid var(--bbt-button, #202428);
  background: var(--bbt-selected-surface, #e4e5e5);
  background: var(--bbt-selected-surface, color-mix(in srgb, var(--bbt-button, #202428) 12%, var(--bbt-surface, #fff)));
  color: var(--bbt-text, #202428);
}

/* The theme places this button in its footer, by shortcode or PHP. */
.bbt-footer-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

@media (max-width: 700px) {
  .bbt-consent { inset: auto 12px 12px; width: auto; }
  .bbt-panel { max-height: min(78vh, 650px); padding: 22px; }
}

@media (max-width: 420px) {
  .bbt-consent { inset: auto 0 0; }
  .bbt-panel { max-height: 85vh; padding: 20px; border-radius: var(--bbt-radius, 8px) var(--bbt-radius, 8px) 0 0; }
  .bbt-actions { grid-template-columns: 1fr; }
  .bbt-actions button { width: 100%; grid-column: auto !important; grid-row: auto !important; }
}

@media (prefers-reduced-motion: reduce) {
  .bbt-actions button:active { transform: none; }
}
