.sg-consent-banner {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 99998;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  padding: 16px;
  background: rgba(9, 13, 18, 0.98);
  border-top: 1px solid var(--sg-line);
  color: var(--sg-text);
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.34);
}

.sg-consent-choice-known .sg-consent-banner,
.sg-consent-banner[hidden],
.sg-consent-error[hidden] {
  display: none;
}

.sg-consent-banner__body {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.sg-consent-banner__copy {
  max-width: 720px;
}

.sg-consent-banner h2,
.sg-consent-dialog h2 {
  margin: 0 0 8px;
  color: var(--sg-text);
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
}

.sg-consent-banner p,
.sg-consent-dialog p {
  margin: 0;
  color: #d1dbe6;
  font-size: 16px;
  line-height: 1.5;
}

.sg-consent-banner a {
  display: inline-block;
  margin-top: 6px;
  color: #f5d8a2;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sg-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sg-consent-banner__actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.sg-consent-button,
.sg-consent-open {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #d4b173;
  border-radius: 5px;
  background: #d4b173;
  color: #111820;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
}

.sg-consent-button--secondary,
.sg-consent-open {
  background: transparent;
  color: #f5d8a2;
}

.sg-consent-banner .sg-consent-button--secondary {
  color: #f5d8a2 !important;
}

.sg-consent-banner .sg-consent-button--secondary:hover {
  color: #111820 !important;
}

.sg-consent-button:hover,
.sg-consent-open:hover {
  border-color: #f5d8a2;
  background: #f5d8a2;
  color: #111820;
}

.sg-consent-button:focus-visible,
.sg-consent-open:focus-visible,
.sg-consent-dialog__close:focus-visible,
.sg-consent-option input:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.sg-consent-dialog {
  width: min(680px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--sg-line);
  border-radius: 8px;
  background: #10161d;
  color: var(--sg-text);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.58);
}

.sg-consent-dialog:not([open]) {
  display: none;
}

.sg-consent-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.sg-consent-dialog__panel {
  margin: 0;
  padding: 24px;
}

.sg-consent-dialog__header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.sg-consent-dialog__close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--sg-line);
  border-radius: 50%;
  background: #1b222a;
  color: var(--sg-text);
  cursor: pointer;
  font: inherit;
  font-size: 28px;
  line-height: 1;
}

.sg-consent-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--sg-line);
}

.sg-consent-option label {
  display: block;
  margin-bottom: 3px;
  color: var(--sg-text);
  font-size: 18px;
  font-weight: 700;
}

.sg-consent-option input {
  width: 24px;
  height: 24px;
  margin: 0 10px;
  accent-color: var(--sg-accent);
}

.sg-consent-option input:disabled {
  opacity: 0.7;
}

.sg-consent-error {
  margin: 16px 0 !important;
  padding: 12px;
  border: 1px solid #e8a7a7;
  border-radius: 5px;
  background: #351b1b;
  color: #ffe7e7 !important;
}

.sg-consent-dialog__actions {
  justify-content: flex-end;
  margin-top: 20px;
}

.sg-consent-open {
  width: 100%;
  text-align: left;
}

.sg-consent-noscript {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 99999;
  max-width: 420px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--sg-line);
  background: #10161d;
  color: var(--sg-text);
}

@media (max-width: 849px) {
  .sg-consent-banner__body {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .sg-consent-banner__actions,
  .sg-consent-dialog__actions {
    justify-content: stretch;
  }

  .sg-consent-button {
    flex: 1 1 150px;
  }
}

@media (max-width: 420px) {
  .sg-consent-banner,
  .sg-consent-dialog__panel {
    padding: 16px;
  }

  .sg-consent-button {
    flex-basis: 100%;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sg-consent-dialog,
  .sg-consent-button,
  .sg-consent-open {
    scroll-behavior: auto;
    transition: none;
  }
}
