:root {
  --gsp-primary: #8300e9;
  --gsp-primary-dark: #9b2cff;
  --gsp-panel: #111827;
  --gsp-panel-strong: #0b1020;
  --gsp-text: #f8fafc;
  --gsp-muted: #cbd5e1;
  --gsp-soft: rgba(255, 255, 255, .07);
  --gsp-border: rgba(255, 255, 255, .13);
  --gsp-light-text: #0f172a;
  --gsp-light-muted: #475569;
  --gsp-shadow: 0 22px 70px rgba(0, 0, 0, .36);
}

.gsp-hidden {
  display: none !important;
}

.gsp-banner,
.gsp-modal {
  box-sizing: border-box;
  font-family: Poppins, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--gsp-text);
  letter-spacing: 0;
}

.gsp-banner *,
.gsp-modal * {
  box-sizing: border-box;
}

.gsp-banner {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 999999;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 20px;
  background: rgba(17, 24, 39, .96);
  border: 1px solid var(--gsp-border);
  border-radius: 24px;
  box-shadow: var(--gsp-shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.gsp-banner__content {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.gsp-banner__content strong {
  color: var(--gsp-text);
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.2;
}

.gsp-banner__content p {
  margin: 0;
  color: var(--gsp-muted);
  font-size: .9rem;
  line-height: 1.5;
}

.gsp-link {
  color: #e9d5ff;
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
}

.gsp-link:hover,
.gsp-link:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.gsp-banner__actions,
.gsp-modal__btns {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.gsp-btn,
.gsp-cookie-settings {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px !important;
  cursor: pointer;
  font-family: inherit !important;
  font-size: .86rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  min-height: 44px;
  padding: 11px 16px !important;
  text-decoration: none !important;
  text-transform: none !important;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .08s ease, box-shadow .16s ease;
  white-space: nowrap;
  box-shadow: none;
}

.gsp-btn:active,
.gsp-cookie-settings:active {
  transform: translateY(1px);
}

.gsp-btn:focus-visible,
.gsp-cookie-settings:focus-visible,
.gsp-close:focus-visible,
.gsp-switch input:focus-visible + .gsp-slider {
  outline: 3px solid rgba(37, 99, 235, .24);
  outline-offset: 2px;
}

.gsp-btn--primary {
  background: var(--gsp-primary) !important;
  border: 1px solid var(--gsp-primary) !important;
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(131, 0, 233, .28);
}

.gsp-btn--primary:hover {
  background: var(--gsp-primary-dark) !important;
  border-color: var(--gsp-primary-dark) !important;
}

.gsp-btn--secondary,
.gsp-btn--ghost {
  background: rgba(255, 255, 255, .06) !important;
  border: 1px solid var(--gsp-border) !important;
  color: #f8fafc !important;
}

.gsp-btn--secondary:hover,
.gsp-btn--ghost:hover {
  background: rgba(255, 255, 255, .11) !important;
  border-color: rgba(255, 255, 255, .24) !important;
}

.gsp-overlay {
  position: fixed;
  inset: 0;
  z-index: 999998;
  background: rgba(15, 23, 42, .44);
}

.gsp-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  width: min(680px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  overflow: hidden;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: var(--gsp-shadow);
}

.gsp-modal__header,
.gsp-modal__footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
}

.gsp-modal__header {
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.gsp-modal__header h3 {
  margin: 0;
  color: var(--gsp-light-text);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.2;
}

.gsp-modal__header p {
  margin: 7px 0 0;
  color: var(--gsp-light-muted);
  font-size: .94rem;
  line-height: 1.55;
}

.gsp-modal__body {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 18px 22px;
}

.gsp-modal__footer {
  align-items: center;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.gsp-close {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 50% !important;
  background: #fff !important;
  cursor: pointer;
}

.gsp-close::before,
.gsp-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 2px;
  background: var(--gsp-light-text);
  border-radius: 999px;
}

.gsp-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.gsp-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.gsp-close:hover {
  background: #f8fafc !important;
}

.gsp-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.gsp-cat strong {
  display: block;
  color: var(--gsp-light-text);
  font-size: .98rem;
  font-weight: 900;
  line-height: 1.2;
}

.gsp-cat p {
  margin: 7px 0 0;
  color: var(--gsp-light-muted);
  font-size: .9rem;
  line-height: 1.55;
}

.gsp-cat--toggle {
  cursor: pointer;
}

.gsp-cat--toggle:hover {
  background: #f8fafc;
}

.gsp-required-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: .76rem;
  font-weight: 900;
  padding: 7px 10px;
  white-space: nowrap;
}

.gsp-switch {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 28px;
}

.gsp-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.gsp-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background-color .18s ease;
}

.gsp-slider::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .18);
  transition: transform .18s ease;
}

.gsp-switch input:checked + .gsp-slider {
  background: var(--gsp-primary);
}

.gsp-switch input:checked + .gsp-slider::before {
  transform: translateX(20px);
}

.gsp-cookie-settings {
  background: transparent !important;
  border: 1px solid #d8b4fe !important;
  color: var(--gsp-primary) !important;
}

.gsp-cookie-settings:hover {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
}

@media (max-width: 760px) {
  .gsp-banner {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    grid-template-columns: 1fr;
    gap: 12px;
    width: auto;
    max-height: calc(100svh - 20px);
    overflow: auto;
    padding: 14px;
    border-radius: 18px;
  }

  .gsp-banner__content {
    gap: 5px;
  }

  .gsp-banner__content strong {
    font-size: .96rem;
  }

  .gsp-banner__content p {
    font-size: .82rem;
    line-height: 1.43;
  }

  .gsp-banner .gsp-link {
    font-size: .8rem;
  }

  .gsp-banner__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    gap: 8px;
  }

  .gsp-banner__actions .gsp-btn--primary {
    grid-column: 1 / -1;
  }

  .gsp-modal__btns {
    display: grid;
    width: 100%;
    gap: 8px;
  }

  .gsp-banner .gsp-btn,
  .gsp-cookie-settings {
    min-width: 0;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px !important;
    font-size: .82rem !important;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .gsp-modal__header,
  .gsp-modal__footer {
    flex-direction: column;
    padding: 18px;
  }

  .gsp-modal__body {
    padding: 14px 18px;
  }

  .gsp-close {
    position: absolute;
    top: 14px;
    right: 14px;
  }

  .gsp-modal__header {
    padding-right: 66px;
  }

  .gsp-cat {
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
  }

  .gsp-cat strong {
    font-size: .93rem;
  }

  .gsp-cat p {
    font-size: .84rem;
    line-height: 1.48;
  }

  .gsp-required-pill {
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 390px) {
  .gsp-banner {
    padding: 12px;
  }

  .gsp-banner__actions {
    gap: 7px;
  }

  .gsp-banner .gsp-btn {
    min-height: 40px;
    padding: 9px 9px !important;
    font-size: .78rem !important;
  }
}
