:root {
  --oce-font-family: sans-serif;
  --oce-font-size: 16px;
  --oce-light-bg: #ffffff;
  --oce-light-text: #18343a;
  --oce-light-accent: #137c72;
  --oce-light-border: #d5e2df;
  --oce-dark-bg: #202a2e;
  --oce-dark-text: #f3f5f3;
  --oce-dark-accent: #70c7b7;
  --oce-dark-border: #49565c;
}

.oce-widget {
  --oce-bg: var(--oce-light-bg);
  --oce-text: var(--oce-light-text);
  --oce-accent: var(--oce-light-accent);
  --oce-border: var(--oce-light-border);
  position: relative;
  z-index: 99999;
  color: var(--oce-text);
  font-family: var(--oce-font-family, sans-serif);
  font-size: clamp(12px, var(--oce-font-size, 16px), 32px);
  line-height: 1.5;
  text-align: left;
}

.oce-widget[data-theme="dark"] {
  --oce-bg: var(--oce-dark-bg);
  --oce-text: var(--oce-dark-text);
  --oce-accent: var(--oce-dark-accent);
  --oce-border: var(--oce-dark-border);
}

@media (prefers-color-scheme: dark) {
  .oce-widget[data-theme="system"] {
    --oce-bg: var(--oce-dark-bg);
    --oce-text: var(--oce-dark-text);
    --oce-accent: var(--oce-dark-accent);
    --oce-border: var(--oce-dark-border);
  }
}

.oce-widget *,
.oce-widget *::before,
.oce-widget *::after {
  box-sizing: border-box;
}

.oce-widget [hidden] {
  display: none !important;
}

.oce-banner,
.oce-dialog__inner,
.oce-settings-link {
  border: 1px solid var(--oce-border);
  border-radius: 8px;
  background: var(--oce-bg);
  color: var(--oce-text);
  box-shadow: 0 14px 40px rgba(19, 48, 54, 0.2);
}

.oce-banner {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(420px, calc(100vw - 32px));
  padding: 22px;
  border-top: 4px solid var(--oce-accent);
}

.oce-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--oce-accent);
  font-size: clamp(12px, calc(var(--oce-font-size) * 0.78), 32px);
  font-weight: 700;
  line-height: 1.4;
}

.oce-indicator {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #d0a63c;
}

.oce-title {
  margin: 0 0 8px;
  color: var(--oce-text);
  font-size: clamp(12px, calc(var(--oce-font-size) * 1.35), 32px);
  font-weight: 700;
  line-height: 1.2;
}

.oce-copy,
.oce-category p {
  color: var(--oce-text);
  font-size: clamp(12px, var(--oce-font-size), 32px);
  line-height: 1.55;
}

.oce-copy p {
  margin: 0 0 8px;
}

.oce-policy-link,
.oce-withdraw {
  color: var(--oce-accent);
  font-size: clamp(12px, calc(var(--oce-font-size) * 0.875), 32px);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.oce-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.oce-button,
.oce-close,
.oce-settings-link {
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--oce-accent);
  border-radius: 5px;
  background: transparent;
  color: var(--oce-text);
  font: inherit;
  font-size: clamp(12px, calc(var(--oce-font-size) * 0.875), 32px);
  line-height: 1.2;
  cursor: pointer;
}

.oce-button--primary {
  background: var(--oce-accent);
  color: #ffffff;
  font-weight: 700;
}

.oce-widget[data-theme="dark"] .oce-button--primary,
.oce-widget[data-theme="system"] .oce-button--primary {
  color: #102a27;
}

.oce-button--text,
.oce-close,
.oce-withdraw {
  border: 0;
  background: transparent;
}

.oce-button:hover,
.oce-close:hover,
.oce-settings-link:hover {
  outline: 2px solid var(--oce-accent);
  outline-offset: 2px;
}

.oce-widget :focus-visible {
  outline: 3px solid #d08a18;
  outline-offset: 3px;
}

.oce-settings-link {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100000;
  background: var(--oce-accent);
  color: #ffffff;
  font-weight: 700;
}

.oce-widget[data-theme="dark"] .oce-settings-link {
  color: #102a27;
}

@media (prefers-color-scheme: dark) {
  .oce-widget[data-theme="system"] .oce-settings-link {
    color: #102a27;
  }
}

.oce-dialog {
  position: fixed;
  inset: 0 24px 24px auto;
  width: min(520px, calc(100vw - 32px));
  max-width: none;
  max-height: min(760px, calc(100vh - 48px));
  margin: auto 0 0;
  padding: 0;
  overflow: auto;
  border: 0;
  background: transparent;
  color: var(--oce-text);
  font: inherit;
}

.oce-dialog::backdrop {
  background: rgba(10, 23, 26, 0.58);
}

.oce-dialog__inner {
  padding: 24px;
  border-top: 4px solid var(--oce-accent);
}

.oce-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.oce-category-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.oce-category {
  padding: 13px 14px;
  border: 1px solid var(--oce-border);
  border-radius: 5px;
}

.oce-category__heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(12px, calc(var(--oce-font-size) * 1.05), 32px);
  font-weight: 700;
  cursor: pointer;
}

.oce-category__heading input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  accent-color: var(--oce-accent);
}

.oce-category__heading input:disabled {
  cursor: not-allowed;
}

.oce-category p {
  margin: 7px 0 0 28px;
}

.oce-required {
  color: var(--oce-accent);
  font-size: clamp(12px, calc(var(--oce-font-size) * 0.78), 32px);
  font-weight: 400;
}

.oce-dialog__actions {
  margin-top: 20px;
}

.oce-withdraw {
  margin-top: 16px;
  padding: 4px 0;
  cursor: pointer;
}

.oce-error {
  color: #a22b1f;
}

@media (max-width: 560px) {
  .oce-banner {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    padding: 18px;
  }

  .oce-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .oce-button {
    width: 100%;
  }

  .oce-settings-link {
    right: 12px;
    bottom: 12px;
  }

  .oce-dialog {
    inset: auto 12px 12px;
    width: auto;
    max-height: calc(100vh - 24px);
  }

  .oce-dialog__inner {
    padding: 18px;
  }
}
