.stgcc,
.stgcc * {
  box-sizing: border-box;
}

.stgcc {
  --stgcc-text: #142032;
  --stgcc-muted: #58677b;
  --stgcc-surface: #ffffff;
  --stgcc-border: #dfe6ef;
  --stgcc-shadow: 0 22px 70px rgba(14, 30, 55, 0.22);
  color: var(--stgcc-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.stgcc [hidden] {
  display: none !important;
}

.stgcc .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.stgcc-banner {
  position: fixed;
  z-index: 999990;
  right: 20px;
  bottom: 20px;
  left: 20px;
  margin: 0 auto;
  max-width: 1180px;
  border: 1px solid var(--stgcc-border);
  border-radius: 20px;
  background: var(--stgcc-surface);
  box-shadow: var(--stgcc-shadow);
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.stgcc-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.stgcc-banner__content {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 22px;
}

.stgcc-brand-mark {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--stgcc-primary);
}

.stgcc-brand-mark span:first-child {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
}

.stgcc-brand-mark span:last-child {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 15px;
  height: 15px;
  border-radius: 5px;
  background: var(--stgcc-accent);
}

.stgcc-banner h2,
.stgcc-modal h2,
.stgcc-category h3 {
  margin: 0;
  color: var(--stgcc-text);
  font: inherit;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.stgcc-banner h2 {
  margin-bottom: 4px;
  font-size: 20px;
}

.stgcc-banner p,
.stgcc-category p {
  margin: 0;
  color: var(--stgcc-muted);
}

.stgcc-banner p {
  font-size: 14px;
}

.stgcc-banner a {
  color: var(--stgcc-primary);
  font-weight: 650;
  text-underline-offset: 2px;
}

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

.stgcc-button,
.stgcc-reopen,
.stgcc-modal__close,
.stgcc-inline-link {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  cursor: pointer;
}

.stgcc-button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.2;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.stgcc-button:hover {
  transform: translateY(-1px);
}

.stgcc-button:focus-visible,
.stgcc-reopen:focus-visible,
.stgcc-modal__close:focus-visible,
.stgcc-inline-link:focus-visible,
.stgcc-switch input:focus-visible + .stgcc-switch__track {
  outline: 3px solid rgba(0, 83, 243, 0.35);
  outline: 3px solid color-mix(in srgb, var(--stgcc-primary) 35%, transparent);
  outline-offset: 2px;
}

.stgcc-button--primary {
  border-color: var(--stgcc-primary);
  background: var(--stgcc-primary);
  color: #fff;
}

.stgcc-button--primary:hover {
  border-color: #142032;
  background: #142032;
}

.stgcc-button--secondary {
  border-color: color-mix(in srgb, var(--stgcc-primary) 20%, #dfe6ef);
  background: color-mix(in srgb, var(--stgcc-primary) 8%, #fff);
  color: var(--stgcc-primary);
}

.stgcc-button--ghost {
  border-color: var(--stgcc-border);
  background: #fff;
  color: var(--stgcc-text);
}

.stgcc-modal {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.stgcc-modal.is-visible {
  opacity: 1;
}

.stgcc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 20, 38, 0.68);
  backdrop-filter: blur(3px);
}

.stgcc-modal__dialog {
  position: relative;
  width: min(100%, 680px);
  max-height: min(88vh, 820px);
  overflow: hidden;
  border: 1px solid var(--stgcc-border);
  border-radius: 20px;
  background: var(--stgcc-surface);
  box-shadow: var(--stgcc-shadow);
  transform: scale(0.98) translateY(8px);
  transition: transform 0.18s ease;
}

.stgcc-modal.is-visible .stgcc-modal__dialog {
  transform: scale(1) translateY(0);
}

.stgcc-modal__header,
.stgcc-modal__footer {
  padding: 18px 22px;
  background: #fff;
}

.stgcc-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--stgcc-border);
}

.stgcc-modal__header h2 {
  font-size: 22px;
}

.stgcc-modal__close {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f1f4f8;
  color: var(--stgcc-text);
  font-size: 28px;
  line-height: 1;
}

.stgcc-modal__body {
  max-height: calc(88vh - 154px);
  overflow: auto;
  padding: 4px 22px;
}

.stgcc-modal__footer {
  border-top: 1px solid var(--stgcc-border);
}

.stgcc-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--stgcc-border);
}

.stgcc-category:last-child {
  border-bottom: 0;
}

.stgcc-category h3 {
  margin-bottom: 3px;
  font-size: 16px;
}

.stgcc-category p {
  font-size: 13px;
}

.stgcc-switch {
  position: relative;
  display: inline-flex;
}

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

.stgcc-switch__track {
  position: relative;
  display: block;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #c9d2dd;
  transition: background 0.18s ease;
}

.stgcc-switch__track::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(14, 30, 55, 0.24);
  content: "";
  transition: transform 0.18s ease;
}

.stgcc-switch input:checked + .stgcc-switch__track {
  background: var(--stgcc-primary);
}

.stgcc-switch input:checked + .stgcc-switch__track::after {
  transform: translateX(20px);
}

.stgcc-switch input:disabled + .stgcc-switch__track {
  background: color-mix(in srgb, var(--stgcc-primary) 62%, #9aa7b7);
  cursor: not-allowed;
}

.stgcc-reopen {
  position: fixed;
  z-index: 999980;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 11px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--stgcc-primary);
  box-shadow: 0 10px 28px rgba(14, 30, 55, 0.25);
}

.stgcc-reopen svg {
  width: 100%;
  fill: #fff;
}

.stgcc-inline-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.stgcc-modal-open {
  overflow: hidden !important;
}

.stgcc-noscript {
  position: fixed;
  z-index: 999999;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 14px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 40px rgba(14, 30, 55, 0.22);
  color: #142032;
  text-align: center;
}

@media (max-width: 920px) {
  .stgcc-banner__content {
    grid-template-columns: auto 1fr;
  }

  .stgcc-banner__actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .stgcc-banner {
    right: 10px;
    bottom: 10px;
    left: 10px;
    border-radius: 16px;
  }

  .stgcc-banner__content {
    display: block;
    padding: 18px;
  }

  .stgcc-brand-mark {
    display: none;
  }

  .stgcc-banner__actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 15px;
  }

  .stgcc-button {
    width: 100%;
  }

  .stgcc-modal {
    align-items: end;
    padding: 0;
  }

  .stgcc-modal__dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }

  .stgcc-modal__body {
    max-height: calc(92vh - 216px);
    padding: 2px 18px;
  }

  .stgcc-modal__header,
  .stgcc-modal__footer {
    padding: 16px 18px;
  }

  .stgcc-modal__footer {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stgcc-banner,
  .stgcc-modal,
  .stgcc-modal__dialog,
  .stgcc-button,
  .stgcc-switch__track,
  .stgcc-switch__track::after {
    transition: none !important;
  }
}
