/* The form checkbox and cookie dialog share .bpf-consent in the existing
   theme. Limit this fix to the actual dialog; preserve all consent behavior. */
.bpf-consent[role="dialog"] {
  display: block;
  padding: var(--wp--preset--spacing--40, 1rem) 0;
}

.bpf-consent[role="dialog"] > .bpf-consent__inner {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--wp--style--global--wide-size, 75rem);
  margin: 0 auto;
  padding-inline: var(--wp--preset--spacing--50, 1.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--wp--preset--spacing--30, .75rem) var(--wp--preset--spacing--50, 1.5rem);
  align-items: start;
}

.bpf-consent[role="dialog"] .bpf-consent__body,
.bpf-consent[role="dialog"] .bpf-consent__ads {
  max-width: none;
}

.bpf-consent[role="dialog"] .bpf-consent__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .5rem;
  width: 100%;
}

.bpf-consent[role="dialog"] .bpf-consent__btn {
  min-width: 0;
  min-height: 48px;
  width: 100%;
  white-space: normal;
}

@media (min-width: 40rem) {
  .bpf-consent[role="dialog"] .bpf-consent__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 62rem) {
  .bpf-consent[role="dialog"] > .bpf-consent__inner {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    column-gap: var(--wp--preset--spacing--70, 3rem);
  }

  .bpf-consent[role="dialog"] .bpf-consent__title { grid-column: 1; grid-row: 1; }
  .bpf-consent[role="dialog"] .bpf-consent__body { grid-column: 1; grid-row: 2; }
  .bpf-consent[role="dialog"] .bpf-consent__policy { grid-column: 1; grid-row: 3; }
  .bpf-consent[role="dialog"] .bpf-consent__ads { grid-column: 2; grid-row: 1 / span 2; }
  .bpf-consent[role="dialog"] .bpf-consent__actions { grid-column: 2; grid-row: 3; }
}
