/*
 * Consent surface: the first-visit bar, the preferences dialog and the reopen
 * control. Accept, reject and preferences share one button class on purpose,
 * so no action is visually louder than the others.
 */

.gw-cookie-bar[data-monteby-consent-banner] {
  position: fixed;
  z-index: 100000;
  right: 24px;
  bottom: 24px;
  left: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 28px;
  align-items: center;
  width: min(920px, calc(100% - 48px));
  max-height: calc(100vh - 48px);
  margin-inline: auto;
  padding: 22px;
  overflow: auto;
  color: var(--monteby-consent-foreground, #fff);
  background: var(--monteby-consent-background, #101114);
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: var(--gw-radius, 8px);
  box-shadow: 0 24px 70px rgb(0 0 0 / 30%);
  font: 400 15px/1.55 var(--gw-font, Inter, sans-serif);
}

.gw-cookie-bar[hidden],
.gw-consent-modal[hidden],
.gw-consent-reopen[hidden] {
  display: none;
}

.gw-cookie-bar__heading {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}

.gw-cookie-bar[data-monteby-consent-banner] .gw-cookie-bar__text {
  margin: 0;
  color: inherit;
}

:is(.gw-cookie-bar[data-monteby-consent-banner], .gw-consent-modal) .gw-cookie-bar__policy {
  color: inherit;
  text-underline-offset: 3px;
}

.gw-cookie-bar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.gw-cookie-bar__button {
  min-height: 44px;
  padding: 10px 18px;
  color: inherit;
  background: transparent;
  border: 1px solid currentcolor;
  border-radius: var(--gw-btn-radius, 999px);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.gw-cookie-bar__button:hover {
  background: rgb(255 255 255 / 12%);
}

.gw-cookie-bar__button:focus-visible,
:is(.gw-cookie-bar[data-monteby-consent-banner], .gw-consent-modal) .gw-cookie-bar__policy:focus-visible,
.gw-consent-modal__close:focus-visible,
.gw-consent-modal__dialog:focus-visible,
.gw-consent-reopen:focus-visible,
.gw-consent-choice:has(input:focus-visible) {
  outline: 3px solid var(--gw-accent, #ff4d1a);
  outline-offset: 3px;
}

.gw-consent-modal {
  position: fixed;
  z-index: 100001;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.gw-consent-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 55%);
}

.gw-consent-modal__dialog {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  padding: 26px;
  overflow: auto;
  color: var(--monteby-consent-foreground, #fff);
  background: var(--monteby-consent-background, #101114);
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: var(--gw-radius, 8px);
  box-shadow: 0 30px 80px rgb(0 0 0 / 45%);
  font: 400 15px/1.55 var(--gw-font, Inter, sans-serif);
}

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

.gw-consent-modal__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.gw-consent-modal__close {
  min-width: 40px;
  min-height: 40px;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.gw-consent-modal__text {
  margin: 0;
}

.gw-consent-modal__choices {
  display: grid;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgb(255 255 255 / 16%);
}

.gw-consent-choice {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
}

.gw-consent-choice input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--gw-accent, #ff4d1a);
}

.gw-consent-choice input:disabled {
  opacity: 0.7;
}

.gw-consent-choice__label {
  font-weight: 700;
  cursor: pointer;
}

.gw-consent-choice input:disabled + .gw-consent-choice__label {
  cursor: default;
}

.gw-consent-choice__note {
  grid-column: 2;
  margin: 0;
  color: rgb(255 255 255 / 72%);
  font-size: 13px;
}

.gw-consent-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid rgb(255 255 255 / 16%);
}

.gw-consent-modal__actions .gw-cookie-bar__button {
  flex: 1 1 160px;
}

.gw-consent-reopen {
  position: fixed;
  z-index: 99999;
  bottom: 16px;
  left: 16px;
  min-height: 40px;
  padding: 8px 16px;
  color: var(--monteby-consent-foreground, #fff);
  background: var(--monteby-consent-background, #101114);
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: var(--gw-btn-radius, 999px);
  font: 700 13px/1.4 var(--gw-font, Inter, sans-serif);
  cursor: pointer;
}

.gw-consent-modal-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .gw-cookie-bar[data-monteby-consent-banner] {
    right: 12px;
    bottom: 12px;
    left: 12px;
    grid-template-columns: 1fr;
    width: auto;
    max-height: calc(100vh - 24px);
    padding: 18px;
  }

  .gw-cookie-bar__actions {
    justify-content: stretch;
  }

  .gw-cookie-bar__button {
    flex: 1 1 auto;
  }

  .gw-consent-modal {
    padding: 12px;
  }

  .gw-consent-modal__dialog {
    padding: 20px;
  }
}
