:root {
  --scc-primary: #1877f2;
  --scc-primary-dark: #145fca;
  --scc-text: #111827;
  --scc-muted: #64748b;
  --scc-border: #dbe2ea;
  --scc-bg: #ffffff;
  --scc-soft: #f8fafc;
}

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

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

.scc-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 20000;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 22px;
  border: 1px solid var(--scc-border);
  border-radius: 16px;
  background: var(--scc-bg);
  color: var(--scc-text);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.scc-banner__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.scc-banner__copy {
  max-width: 720px;
}

.scc-banner h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  line-height: 1.25;
}

.scc-banner p {
  margin: 0;
  color: var(--scc-muted);
  line-height: 1.55;
}

.scc-banner__legal {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.9rem;
}

.scc-banner a,
.scc-modal a {
  color: var(--scc-primary-dark);
  font-weight: 700;
  text-decoration: none;
}

.scc-banner a:hover,
.scc-modal a:hover {
  text-decoration: underline;
}

.scc-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  min-width: 410px;
}

.scc-button {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--scc-border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--scc-text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.scc-button:hover {
  background: #f3f6f9;
}

.scc-button--primary {
  border-color: var(--scc-primary);
  background: var(--scc-primary);
  color: #ffffff;
}

.scc-button--primary:hover {
  background: var(--scc-primary-dark);
}

.scc-button:focus-visible,
.scc-switch input:focus-visible + .scc-switch__slider,
.app-footer__cookie-settings:focus-visible {
  outline: 3px solid rgba(24, 119, 242, 0.28);
  outline-offset: 2px;
}

.scc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.58);
}

.scc-modal {
  width: min(760px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  border-radius: 18px;
  background: #ffffff;
  color: var(--scc-text);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.34);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.scc-modal__header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--scc-border);
  background: #ffffff;
}

.scc-modal__header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.scc-modal h2 {
  margin: 0;
  font-size: 1.45rem;
}

.scc-modal__intro {
  margin: 8px 0 0;
  color: var(--scc-muted);
  line-height: 1.55;
}

.scc-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--scc-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--scc-text);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

.scc-modal__body {
  padding: 20px 24px;
}

.scc-category {
  margin-bottom: 14px;
  border: 1px solid var(--scc-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--scc-soft);
}

.scc-category__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
}

.scc-category__title {
  margin: 0 0 4px;
  font-size: 1.02rem;
}

.scc-category__description {
  margin: 0;
  color: var(--scc-muted);
  font-size: 0.93rem;
  line-height: 1.48;
}

.scc-category__required {
  display: inline-block;
  margin-top: 7px;
  color: var(--scc-primary-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.scc-category__details {
  padding: 0 16px 16px;
}

.scc-details-toggle {
  border: 0;
  background: transparent;
  color: var(--scc-primary-dark);
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
}

.scc-cookie-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.scc-cookie {
  padding: 12px;
  border: 1px solid var(--scc-border);
  border-radius: 10px;
  background: #ffffff;
}

.scc-cookie strong {
  display: block;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.scc-cookie dl {
  margin: 0;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 4px 10px;
  color: var(--scc-muted);
  font-size: 0.84rem;
}

.scc-cookie dt {
  font-weight: 800;
  color: #475569;
}

.scc-cookie dd {
  margin: 0;
}

.scc-no-services {
  margin: 10px 0 0;
  color: var(--scc-muted);
  font-size: 0.88rem;
}

.scc-switch {
  position: relative;
  display: inline-flex;
  width: 50px;
  height: 28px;
  flex: 0 0 auto;
}

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

.scc-switch__slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: 0.18s ease;
}

.scc-switch__slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.24);
  transition: 0.18s ease;
}

.scc-switch input:checked + .scc-switch__slider {
  background: var(--scc-primary);
}

.scc-switch input:checked + .scc-switch__slider::before {
  transform: translateX(22px);
}

.scc-switch input:disabled + .scc-switch__slider {
  cursor: not-allowed;
  opacity: 0.8;
}

.scc-modal__footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--scc-border);
  background: #ffffff;
}

.scc-modal__footer-left,
.scc-modal__footer-right {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.scc-modal-open {
  overflow: hidden;
}

@media (max-width: 850px) {
  .scc-banner__content {
    align-items: flex-start;
    flex-direction: column;
  }

  .scc-actions {
    min-width: 0;
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .scc-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 17px;
  }

  .scc-actions,
  .scc-modal__footer,
  .scc-modal__footer-left,
  .scc-modal__footer-right {
    flex-direction: column;
    width: 100%;
  }

  .scc-button {
    width: 100%;
  }

  .scc-backdrop {
    padding: 10px;
  }

  .scc-modal__header,
  .scc-modal__body,
  .scc-modal__footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .scc-cookie dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
