.refo-consent {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 2147483000;
  display: flex;
  justify-content: center;
  color: var(--refo-text-primary);
  font-size: 15px;
  line-height: 1.4;
}

html.refo-consent-modal-open,
body.refo-consent-modal-open {
  overflow: hidden;
}

.refo-consent-settings-footer {
  display: flex;
  justify-content: flex-start;
  padding-top: 8px;
}

.refo-consent-settings-footer__button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  line-height: 1.3;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  cursor: pointer;
  opacity: 0.86;
}

.refo-consent-settings-footer__button:hover,
.refo-consent-settings-footer__button:focus-visible {
  color: inherit;
  opacity: 1;
}

.refo-consent-settings-footer__button:focus-visible {
  outline: 3px solid var(--refo-signal-ring);
  outline-offset: 3px;
}

.refo-consent-settings-footer__icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--refo-signal);
}

.refo-consent,
.refo-consent *,
.refo-consent *::before,
.refo-consent *::after {
  box-sizing: border-box;
}

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

.refo-consent__body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 24px;
  width: min(100%, 1120px);
  padding: 20px;
  border: 1px solid var(--refo-border-blue-muted);
  border-radius: var(--refo-radius-card);
  background:
    linear-gradient(135deg, var(--refo-signal-subtle), var(--refo-bg-surface) 42%),
    var(--refo-bg-surface);
  box-shadow: var(--refo-shadow-popover);
}

.refo-consent__text,
.refo-consent__settings-panel,
.refo-consent__choices,
.refo-consent__actions {
  display: flex;
  gap: 12px;
}

.refo-consent__text,
.refo-consent__settings-panel {
  flex-direction: column;
  align-items: flex-start;
  max-width: 680px;
}

.refo-consent__eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 4px 9px;
  border: 1px solid var(--refo-signal-border);
  border-radius: 999px;
  background: var(--refo-bg-surface);
  color: var(--refo-signal-hover);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.refo-consent__text strong,
.refo-consent__settings-panel strong {
  color: var(--refo-text-primary);
  font-size: 18px;
  line-height: 1.2;
}

.refo-consent__text span:last-child,
.refo-consent__settings-panel > span:not(.refo-consent__eyebrow):not(.refo-consent__settings-icon) {
  color: var(--refo-text-secondary);
  line-height: 1.47;
}

.refo-consent__settings-panel small {
  margin-top: auto;
  color: var(--refo-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.refo-consent__settings-icon,
.refo-consent__choice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: var(--refo-radius-card);
}

.refo-consent__settings-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  background: var(--refo-signal-subtle);
  color: var(--refo-signal-hover);
}

.refo-consent__settings-icon-svg {
  width: 34px;
  height: 34px;
}

.refo-consent__choices {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.refo-consent__choices-title {
  display: none;
}

.refo-consent__choice {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  min-height: 112px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--refo-border-subtle);
  border-radius: var(--refo-radius-card);
  background: var(--refo-bg-surface);
  box-shadow: var(--refo-shadow-xs);
}

.refo-consent__choices label {
  cursor: pointer;
}

.refo-consent__choices label:hover {
  border-color: var(--refo-primary-border-hover);
  background: var(--refo-bg-surface-hover);
}

.refo-consent__choices label:has(input:checked) {
  border-color: var(--refo-signal);
  background: var(--refo-signal-subtle);
}

.refo-consent__choices label:focus-within {
  outline: 3px solid var(--refo-signal-ring);
  outline-offset: 2px;
}

.refo-consent__choice--locked {
  border-color: var(--refo-border-blue-muted);
  background: var(--refo-bg-surface-raised);
}

.refo-consent__choice-icon {
  width: 44px;
  height: 44px;
  background: var(--refo-bg-blue-subtle);
  color: var(--refo-primary);
}

.refo-consent__choice-icon--necessary {
  background: var(--refo-signal-subtle);
  color: var(--refo-signal-hover);
}

.refo-consent__choice-icon--marketing {
  background: var(--refo-status-warning-bg);
  color: var(--refo-status-warning-text);
}

.refo-consent__choice-icon-svg {
  width: 24px;
  height: 24px;
}

.refo-consent__choice-copy {
  display: grid;
  gap: 5px;
}

.refo-consent__choice-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.refo-consent__choices strong {
  color: var(--refo-text-primary);
  font-size: 15px;
}

.refo-consent__choices small {
  color: var(--refo-text-muted);
  font-size: 13px;
  line-height: 1.35;
}

.refo-consent__choice-status {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid var(--refo-signal-border);
  border-radius: 999px;
  background: var(--refo-signal-subtle);
  color: var(--refo-signal-hover);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.refo-consent__choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.refo-consent__choice-toggle {
  display: none;
}

.refo-consent__actions {
  align-items: center;
  justify-content: flex-end;
  align-self: end;
}

.refo-consent__button,
.refo-consent__close {
  border: 1px solid var(--refo-border-default);
  border-radius: var(--refo-radius-control);
  background: var(--refo-bg-surface);
  color: var(--refo-text-primary);
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color var(--refo-duration-fast) var(--refo-ease-standard),
    border-color var(--refo-duration-fast) var(--refo-ease-standard),
    box-shadow var(--refo-duration-fast) var(--refo-ease-standard),
    color var(--refo-duration-fast) var(--refo-ease-standard);
}

.refo-consent__button {
  min-height: 44px;
  padding: 9px 16px;
}

.refo-consent__button:hover,
.refo-consent__close:hover {
  border-color: var(--refo-primary-border-hover);
  background: var(--refo-bg-surface-hover);
}

.refo-consent__button--primary {
  border-color: var(--refo-signal);
  background: var(--refo-signal);
  color: var(--refo-on-signal);
  box-shadow: 0 10px 24px var(--refo-signal-ring);
}

.refo-consent__button--primary:hover {
  border-color: var(--refo-signal-hover);
  background: var(--refo-signal-hover);
  color: var(--refo-on-signal);
}

.refo-consent__button:focus-visible,
.refo-consent__close:focus-visible {
  outline: 3px solid var(--refo-signal-ring);
  outline-offset: 2px;
}

.refo-consent__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
}

.refo-consent--settings {
  inset: 0;
  align-items: center;
  padding: 24px;
  background: var(--refo-overlay-backdrop);
  backdrop-filter: blur(2px);
  overscroll-behavior: contain;
}

.refo-consent--settings .refo-consent__body {
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 0;
  width: min(100%, 1360px);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 0;
  border-color: var(--refo-border-blue-muted);
  background: var(--refo-bg-surface);
  box-shadow: var(--refo-shadow-popover);
}

.refo-consent--settings .refo-consent__settings-panel {
  grid-row: 1 / span 2;
  max-width: none;
  min-height: 100%;
  padding: 40px 36px;
  border-right: 1px solid var(--refo-border-blue-muted);
  background:
    linear-gradient(145deg, var(--refo-signal-subtle), var(--refo-bg-blue-subtle)),
    var(--refo-bg-surface);
}

.refo-consent--settings .refo-consent__settings-panel strong {
  font-size: 22px;
}

.refo-consent--settings .refo-consent__choices {
  grid-column: 2;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 34px 36px 24px;
}

.refo-consent--settings .refo-consent__choices-title {
  display: block;
  margin: 0 54px 10px 0;
  color: var(--refo-text-primary);
  font-size: 24px;
  line-height: 1.2;
}

.refo-consent--settings .refo-consent__choice {
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 104px;
  padding: 18px;
  border-color: var(--refo-border-blue-muted);
  box-shadow: none;
}

.refo-consent--settings .refo-consent__choice-icon {
  width: 56px;
  height: 56px;
}

.refo-consent--settings .refo-consent__choice-icon-svg {
  width: 30px;
  height: 30px;
}

.refo-consent--settings .refo-consent__choices strong {
  font-size: 18px;
}

.refo-consent--settings .refo-consent__choices small {
  font-size: 15px;
  line-height: 1.42;
}

.refo-consent--settings .refo-consent__choice-toggle {
  display: inline-flex;
  position: relative;
  width: 64px;
  height: 34px;
  border: 1px solid var(--refo-border-default);
  border-radius: 999px;
  background: var(--refo-bg-muted);
  box-shadow: inset 0 1px 2px oklch(0.263 0.068 259.1 / 0.1);
}

.refo-consent--settings .refo-consent__choice-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--refo-bg-surface);
  box-shadow: var(--refo-shadow-sm);
  transition:
    transform var(--refo-duration-fast) var(--refo-ease-standard),
    background-color var(--refo-duration-fast) var(--refo-ease-standard);
}

.refo-consent--settings .refo-consent__choice input:checked + .refo-consent__choice-toggle,
.refo-consent--settings .refo-consent__choice-toggle--locked {
  border-color: var(--refo-signal-border);
  background: var(--refo-signal);
}

.refo-consent--settings .refo-consent__choice input:checked + .refo-consent__choice-toggle::after,
.refo-consent--settings .refo-consent__choice-toggle--locked::after {
  transform: translateX(30px);
}

.refo-consent--settings .refo-consent__actions {
  position: sticky;
  bottom: 0;
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 28px 36px 36px;
  border-top: 1px solid var(--refo-border-subtle);
  background: var(--refo-bg-surface);
}

.refo-consent.refo-consent--settings [data-refo-consent-accept] {
  border-color: var(--refo-signal);
  background: var(--refo-signal);
  color: var(--refo-on-signal);
  box-shadow: 0 10px 24px var(--refo-signal-ring);
}

.refo-consent.refo-consent--settings [data-refo-consent-accept]:hover {
  border-color: var(--refo-signal-hover);
  background: var(--refo-signal-hover);
  color: var(--refo-on-signal);
}

.refo-consent--settings [data-refo-consent-save] {
  color: var(--refo-signal-hover);
}

.refo-consent--settings [data-refo-consent-save]:hover {
  color: var(--refo-text-primary);
}

@media (max-width: 900px) {
  .refo-consent__body {
    grid-template-columns: 1fr;
  }

  .refo-consent__text {
    max-width: none;
  }

  .refo-consent__actions {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .refo-consent__button {
    flex: 1 1 150px;
  }

  .refo-consent--settings .refo-consent__body {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 32px);
  }

  .refo-consent--settings .refo-consent__settings-panel {
    grid-row: auto;
    padding: 28px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--refo-border-blue-muted);
  }

  .refo-consent--settings .refo-consent__choices,
  .refo-consent--settings .refo-consent__actions {
    grid-column: 1;
    padding-right: 24px;
    padding-left: 24px;
  }
}

@media (max-width: 760px) {
  .refo-consent {
    right: 8px;
    bottom: 8px;
    left: 8px;
  }

  .refo-consent__body {
    gap: 14px;
    padding: 14px;
  }

  .refo-consent__choices {
    grid-template-columns: 1fr;
  }

  .refo-consent__button {
    flex: 1 1 140px;
  }

  .refo-consent--settings {
    padding: 8px;
  }

  .refo-consent--settings .refo-consent__body {
    gap: 0;
    padding: 0;
    border-radius: var(--refo-radius-card);
  }

  .refo-consent--settings .refo-consent__close {
    top: 12px;
    right: 12px;
  }

  .refo-consent--settings .refo-consent__settings-panel {
    padding: 22px;
  }

  .refo-consent--settings .refo-consent__settings-icon {
    width: 52px;
    height: 52px;
  }

  .refo-consent--settings .refo-consent__settings-panel strong {
    font-size: 20px;
  }

  .refo-consent--settings .refo-consent__choices {
    padding: 22px 14px 18px;
  }

  .refo-consent--settings .refo-consent__choices-title {
    margin-right: 48px;
    font-size: 20px;
  }

  .refo-consent--settings .refo-consent__choice {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    min-height: auto;
    padding: 14px;
  }

  .refo-consent--settings .refo-consent__choice-icon {
    width: 46px;
    height: 46px;
  }

  .refo-consent--settings .refo-consent__choice-toggle {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .refo-consent--settings .refo-consent__actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 16px 14px 14px;
  }
}

@media (max-width: 520px) {
  .refo-consent--settings .refo-consent__actions {
    grid-template-columns: 1fr;
  }
}
