:root.jkcc-open {
  overflow: hidden;
}

#jkcc-root,
#jkcc-root *,
.jkcc-manage,
.jkcc-inline-manage {
  box-sizing: border-box;
}

#jkcc-root[hidden],
.jkcc-manage[hidden],
#jkcc-root [hidden] {
  display: none !important;
}

#jkcc-root {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  background: rgba(17, 24, 39, 0.36);
  font-family: inherit;
}

.jkcc-position-bottom {
  justify-content: center;
}

.jkcc-position-bottom-left {
  justify-content: flex-start;
}

.jkcc-position-bottom-right {
  justify-content: flex-end;
}

.jkcc-banner {
  width: min(1180px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 14px;
  background: #fff;
  color: #17202a;
  box-shadow: 0 18px 55px rgba(17, 24, 39, 0.25);
}

.jkcc-position-bottom-left .jkcc-banner,
.jkcc-position-bottom-right .jkcc-banner {
  width: min(500px, 100%);
}

.jkcc-copy h2 {
  margin: 0 0 8px;
  color: #17202a;
  font-size: clamp(20px, 2.3vw, 26px);
  line-height: 1.25;
}

.jkcc-copy p,
.jkcc-category p {
  margin: 0;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.55;
}

.jkcc-policy {
  margin-top: 8px !important;
}

.jkcc-policy a {
  color: var(--jkcc-accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.jkcc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.jkcc-button,
.jkcc-manage,
.jkcc-inline-manage {
  min-height: 44px;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.jkcc-button {
  padding: 11px 16px;
}

.jkcc-button-primary,
.jkcc-button-secondary {
  border: 2px solid var(--jkcc-accent);
}

.jkcc-button-primary {
  background: var(--jkcc-accent);
  color: #fff;
}

.jkcc-button-secondary {
  background: #fff;
  color: var(--jkcc-accent);
}

.jkcc-button-link {
  border: 0;
  background: transparent;
  color: #27364a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.jkcc-button:focus-visible,
.jkcc-manage:focus-visible,
.jkcc-inline-manage:focus-visible,
.jkcc-switch input:focus-visible + span,
.jkcc-policy a:focus-visible {
  outline: 3px solid #f5b700;
  outline-offset: 3px;
}

.jkcc-preferences {
  margin-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.jkcc-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #e5e7eb;
}

.jkcc-category h3 {
  margin: 0 0 4px;
  color: #17202a;
  font-size: 16px;
  line-height: 1.35;
}

.jkcc-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

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

.jkcc-switch span {
  position: relative;
  display: block;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #9ca3af;
  transition: background 160ms ease;
}

.jkcc-switch span::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 160ms ease;
}

.jkcc-switch input:checked + span {
  background: var(--jkcc-accent);
}

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

.jkcc-switch input:disabled + span {
  opacity: 0.62;
  cursor: not-allowed;
}

.jkcc-manage {
  position: fixed;
  z-index: 2147482000;
  left: 16px;
  bottom: 16px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: var(--jkcc-accent);
  color: #fff;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.24);
}

.jkcc-inline-manage {
  padding: 10px 14px;
  border: 2px solid currentColor;
  background: transparent;
  color: inherit;
}

@media (min-width: 820px) {
  .jkcc-position-bottom .jkcc-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 28px;
    align-items: center;
  }

  .jkcc-position-bottom .jkcc-preferences {
    grid-column: 1 / -1;
  }

  .jkcc-position-bottom .jkcc-actions {
    justify-content: flex-end;
    margin-top: 0;
  }

  .jkcc-position-bottom .jkcc-preferences + .jkcc-actions {
    grid-column: 1 / -1;
    margin-top: 18px;
  }
}

@media (max-width: 620px) {
  #jkcc-root {
    padding: 10px;
  }

  .jkcc-banner {
    padding: 18px;
    border-radius: 12px;
  }

  .jkcc-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .jkcc-button {
    width: 100%;
  }

  .jkcc-category {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jkcc-switch span,
  .jkcc-switch span::after {
    transition: none;
  }
}
