/* Cookie Banner & Preferences Dialog — przezokno.tech */
.cb-banner[hidden] {
  display: none !important;
}

.cb-banner {
  position: fixed;
  inset-inline: 1rem;
  bottom: 1rem;
  z-index: 90;
  max-width: 78rem;
  margin-inline: auto;
  border-radius: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 15, 20, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  color: #d4d4d8;
}

.cb-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}

@media (min-width: 1024px) {
  .cb-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }
}

.cb-banner__content {
  max-width: 48rem;
}

.cb-banner__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a1a1aa;
  margin-bottom: 0.4rem;
}

.cb-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 9999px;
  background-color: #34d399;
}

.cb-banner__text {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #a1a1aa;
  margin: 0;
}

.cb-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cb-link {
  color: #f4f4f5;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
}

.cb-link:hover {
  text-decoration-color: #ffffff;
}

.cb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem;
  border-radius: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
  white-space: nowrap;
}

.cb-btn--primary {
  background-color: #f4f4f5;
  color: #09090b;
  border: 1px solid #f4f4f5;
}

.cb-btn--primary:hover {
  background-color: #ffffff;
  border-color: #ffffff;
}

.cb-btn--secondary {
  background-color: #18181b;
  color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.cb-btn--secondary:hover {
  background-color: #27272a;
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

/* Native <dialog> Modal */
.cb-dialog {
  width: min(40rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  background: #111116;
  color: #e4e4e7;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7);
  overflow: auto;
}

.cb-dialog::backdrop {
  background: rgba(5, 5, 8, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cb-dialog__panel {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .cb-dialog__panel {
    padding: 1.75rem;
  }
}

.cb-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cb-dialog__eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #71717a;
  margin: 0 0 0.25rem;
}

.cb-dialog__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f4f4f5;
  margin: 0;
}

.cb-dialog__desc {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #a1a1aa;
  margin: 0;
}

.cb-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #18181b;
  color: #a1a1aa;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.cb-icon-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
}

.cb-categories {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cb-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0b0b0f;
}

.cb-category__info {
  flex: 1;
}

.cb-category__title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #f4f4f5;
  margin-bottom: 0.25rem;
  cursor: pointer;
}

.cb-category__desc {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #a1a1aa;
  margin: 0;
}

.cb-category__desc code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  color: #d4d4d8;
}

.cb-badge {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
}

.cb-badge--active {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Accessible Toggle Switch */
.cb-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-top: 0.15rem;
  cursor: pointer;
}

.cb-switch--locked {
  opacity: 0.7;
  cursor: not-allowed;
}

.cb-switch input {
  position: absolute;
  opacity: 0;
  width: 2.6rem;
  height: 1.45rem;
  margin: 0;
  cursor: inherit;
}

.cb-switch__track {
  position: relative;
  width: 2.6rem;
  height: 1.45rem;
  border-radius: 9999px;
  background: #27272a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: background-color 180ms ease, border-color 180ms ease;
}

.cb-switch__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 9999px;
  background: #d4d4d8;
  transition: transform 180ms ease, background-color 180ms ease;
}

.cb-switch input:checked + .cb-switch__track {
  background: #10b981;
  border-color: #10b981;
}

.cb-switch input:checked + .cb-switch__track::after {
  transform: translateX(1.12rem);
  background: #09090b;
}

.cb-switch input:focus-visible + .cb-switch__track {
  outline: 2px solid #f4f4f5;
  outline-offset: 2px;
}

.cb-dialog__footer {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cb-dialog__footer-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .cb-dialog__footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
