.sg-consent-overlay[hidden],
.sg-consent-dialog[hidden],
.sg-jingle-toggle[hidden] {
  display: none !important;
}

#sg-consent-root,
#sg-consent-root *,
#sg-consent-root *::before,
#sg-consent-root *::after {
  box-sizing: border-box;
}

.sg-consent-overlay {
  --sg-consent-surface: rgba(15, 27, 45, 0.97);
  --sg-consent-primary: #1b4e8e;
  --sg-consent-primary-hover: #2361ac;
  --sg-consent-text: #ffffff;
  --sg-consent-muted: rgba(255, 255, 255, 0.74);
  --sg-consent-subtle: rgba(255, 255, 255, 0.58);
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  overflow: hidden;
  background: rgba(6, 13, 24, 0.84);
  backdrop-filter: blur(5px);
  opacity: 1;
  transition: opacity 0.28s ease;
}

.sg-consent-overlay.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.sg-consent-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--sg-consent-text);
  text-align: center;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.sg-consent-welcome {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.sg-consent-line-one,
.sg-consent-line-two {
  display: block;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-style: italic;
}

.sg-consent-line-one {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(16px, 2.8vw, 26px);
  font-weight: 400;
}

.sg-consent-line-two {
  color: #ffffff;
  font-size: clamp(38px, 6vw, 66px);
  font-weight: 600;
  line-height: 1.08;
}

.sg-consent-divider {
  width: 40px;
  height: 1px;
  margin: 24px auto 0;
  background: rgba(255, 255, 255, 0.38);
}

#sg-consent-title:focus {
  outline: none;
}

.sg-consent-panel {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 328px;
  grid-template-areas: "copy actions" "note actions";
  align-items: center;
  column-gap: 32px;
  row-gap: 8px;
  width: 100%;
  padding: 20px 32px calc(16px + env(safe-area-inset-bottom));
  background: var(--sg-consent-surface);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 -16px 40px rgba(6, 13, 24, 0.22);
  backdrop-filter: blur(20px);
  text-align: left;
}

.sg-consent-copy {
  grid-area: copy;
  max-width: 780px;
}

.sg-consent-copy h2 {
  margin: 0;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.sg-consent-copy p {
  max-width: 78ch;
  margin: 6px 0 0;
  color: var(--sg-consent-muted);
  font-size: 12px;
  line-height: 1.6;
}

.sg-consent-actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
}

.sg-consent-primary,
.sg-consent-secondary,
.sg-consent-save,
.sg-consent-close,
.sg-cookie-reopen {
  font-family: "Plus Jakarta Sans", sans-serif;
}

.sg-consent-primary {
  width: 100%;
  min-height: 52px;
  padding: 12px 24px;
  border: 1px solid #77a7e0;
  border-radius: 999px;
  background: var(--sg-consent-primary);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(27, 78, 142, 0.28);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.sg-consent-primary:hover {
  background: var(--sg-consent-primary-hover);
  box-shadow: 0 8px 22px rgba(27, 78, 142, 0.34);
}

.sg-consent-secondary-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.sg-consent-secondary {
  min-height: 44px;
  padding: 12px 4px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  cursor: pointer;
}

.sg-consent-secondary:hover {
  color: #ffffff;
}

.sg-consent-note {
  grid-area: note;
  display: block;
  margin: 0;
  color: var(--sg-consent-subtle);
  font-size: 10px;
  line-height: 1.5;
}

.sg-consent-note a {
  color: inherit;
  text-underline-offset: 3px;
}

.sg-consent-dialog {
  position: fixed;
  inset: 0;
  z-index: 2147483100;
  width: min(500px, calc(100% - 32px));
  max-height: calc(100dvh - 44px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: #0f1b2d;
  color: #ffffff;
  box-shadow: 0 20px 64px rgba(6, 13, 24, 0.42);
  font-family: "Plus Jakarta Sans", sans-serif;
}

.sg-consent-dialog::backdrop {
  background: rgba(6, 13, 24, 0.72);
  backdrop-filter: blur(4px);
}

.sg-consent-dialog-head {
  position: relative;
  padding: 26px 64px 14px 28px;
}

.sg-consent-dialog-head h2 {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  font-weight: 600;
}

.sg-consent-dialog-head p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.65;
}

.sg-consent-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #ffffff;
  font-size: 25px;
  cursor: pointer;
}

.sg-consent-dialog-body {
  max-height: calc(100dvh - 330px);
  padding: 0 28px 8px;
  overflow: auto;
}

.sg-consent-purpose {
  padding: 12px 0;
}

.sg-consent-check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
}

.sg-consent-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #1b4e8e;
}

.sg-consent-check small {
  margin-left: auto;
  color: #9fc4ef;
  font-size: 10px;
}

.sg-consent-purpose p {
  margin: 0 0 0 30px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  line-height: 1.65;
}

.sg-consent-dialog-note {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  line-height: 1.6;
}

.sg-consent-dialog-foot {
  padding: 15px 28px 24px;
}

.sg-consent-required {
  width: 100%;
  min-height: 44px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.sg-consent-save {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #0f1b2d;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sg-consent-primary:focus-visible,
.sg-consent-secondary:focus-visible,
.sg-consent-dialog button:focus-visible,
.sg-consent-dialog input:focus-visible,
.sg-cookie-reopen:focus-visible,
.sg-jingle-toggle:focus-visible {
  outline: 3px solid #9fc4ef;
  outline-offset: 3px;
}

.sg-cookie-reopen {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.sg-jingle-toggle {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #1b4e8e;
  color: #ffffff;
  box-shadow: 0 8px 32px rgba(27, 78, 142, 0.2);
  cursor: pointer;
}

@media (max-width: 760px) {
  .sg-consent-welcome {
    padding: 24px 20px;
  }

  .sg-consent-line-two {
    font-size: clamp(30px, 8.6vw, 44px);
  }

  .sg-consent-divider {
    margin-top: 20px;
  }

  .sg-consent-panel {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "actions" "note";
    row-gap: 8px;
    padding: 16px 20px calc(12px + env(safe-area-inset-bottom));
    text-align: center;
  }

  .sg-consent-copy {
    max-width: 44ch;
    margin: 0 auto;
  }

  .sg-consent-copy p {
    line-height: 1.55;
  }

  .sg-consent-dialog-body {
    max-height: calc(100dvh - 320px);
  }
}

@media (max-width: 380px) {
  .sg-consent-panel {
    padding-right: 16px;
    padding-left: 16px;
  }

  .sg-consent-secondary-row {
    gap: 16px;
  }
}

@media (max-height: 590px) and (min-width: 761px) {
  .sg-consent-welcome {
    padding: 16px 20px;
  }

  .sg-consent-line-one {
    font-size: 14px;
  }

  .sg-consent-line-two {
    font-size: 36px;
  }

  .sg-consent-divider {
    margin-top: 12px;
  }

  .sg-consent-panel {
    grid-template-columns: minmax(0, 1fr) 304px;
    column-gap: 24px;
    padding: 12px 24px calc(10px + env(safe-area-inset-bottom));
  }

  .sg-consent-primary {
    min-height: 48px;
  }

  .sg-consent-dialog-body {
    max-height: calc(100dvh - 245px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sg-consent-overlay,
  .sg-consent-primary {
    transition: none;
  }

  .sg-consent-overlay,
  .sg-consent-panel,
  .sg-consent-dialog::backdrop {
    backdrop-filter: none;
  }
}
