:root {
  --dnkcc-bg: var(--dnk-card, #21301f);
  --dnkcc-fg: var(--dnk-foreground, #f2f3ee);
  --dnkcc-title: var(--dnk-title, #ffffff);
  --dnkcc-muted: var(--dnk-muted-foreground, #c3c9bd);
  --dnkcc-accent: var(--dnk-accent, #4c7a5e);
  --dnkcc-surface: var(--dnk-surface, #2c3e2a);
  --dnkcc-shadow: 0 -8px 30px rgba(0, 0, 0, 0.35);
}

.dnkcc-banner,
.dnkcc-modal,
.dnkcc-reopen {
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.5;
}
.dnkcc-banner *,
.dnkcc-modal *,
.dnkcc-reopen * {
  box-sizing: border-box;
}

/* ---------- bottom banner ---------- */
.dnkcc-banner {
  position: fixed;
  z-index: 99999;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--dnkcc-bg);
  color: var(--dnkcc-fg);
  box-shadow: var(--dnkcc-shadow);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
  transform: translateY(0);
  transition: transform 0.25s ease;
}
.dnkcc-banner[hidden] {
  display: none !important;
}
.dnkcc-banner__text {
  flex: 1 1 420px;
  min-width: 0;
  font-size: 14px;
  color: var(--dnkcc-muted);
}
.dnkcc-banner__text strong {
  color: var(--dnkcc-title);
}
.dnkcc-banner__text a {
  color: var(--dnkcc-accent);
  text-decoration: underline;
}
.dnkcc-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

.dnkcc-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.dnkcc-btn--primary {
  background: var(--dnkcc-accent);
  color: #fff;
}
.dnkcc-btn--secondary {
  background: transparent;
  color: var(--dnkcc-fg);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.dnkcc-btn--text {
  background: transparent;
  color: var(--dnkcc-muted);
  text-decoration: underline;
  padding: 11px 4px;
}

/* ---------- settings modal ---------- */
.dnkcc-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}
.dnkcc-modal[hidden] {
  display: none !important;
}
.dnkcc-modal__panel {
  width: min(560px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--dnkcc-bg);
  color: var(--dnkcc-fg);
  border-radius: 16px;
  padding: 28px;
}
.dnkcc-modal__title {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 700;
  color: var(--dnkcc-title);
}
.dnkcc-modal__intro {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--dnkcc-muted);
}

.dnkcc-category {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 0;
}
.dnkcc-category:last-of-type {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 20px;
}
.dnkcc-category__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dnkcc-category__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--dnkcc-title);
}
.dnkcc-category__desc {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--dnkcc-muted);
}
.dnkcc-category__details {
  margin-top: 10px;
  font-size: 12px;
}
.dnkcc-category__details summary {
  cursor: pointer;
  color: var(--dnkcc-accent);
}
.dnkcc-cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 12px;
}
.dnkcc-cookie-table th,
.dnkcc-cookie-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--dnkcc-muted);
}
.dnkcc-cookie-table th {
  color: var(--dnkcc-title);
  font-weight: 600;
}
.dnkcc-cookie-table code {
  color: var(--dnkcc-fg);
}

/* toggle switch */
.dnkcc-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
}
.dnkcc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.dnkcc-switch__track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  transition: background 0.15s ease;
}
.dnkcc-switch__track::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
}
.dnkcc-switch input:checked + .dnkcc-switch__track {
  background: var(--dnkcc-accent);
}
.dnkcc-switch input:checked + .dnkcc-switch__track::before {
  transform: translateX(18px);
}
.dnkcc-switch input:disabled + .dnkcc-switch__track {
  opacity: 0.5;
  cursor: not-allowed;
}

.dnkcc-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

/* ---------- reopen trigger ---------- */
.dnkcc-reopen {
  position: fixed;
  z-index: 99998;
  left: 16px;
  bottom: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--dnkcc-surface);
  color: var(--dnkcc-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.dnkcc-reopen[hidden] {
  display: none !important;
}
.dnkcc-reopen svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 640px) {
  .dnkcc-banner {
    padding: 16px;
  }
  .dnkcc-banner__actions {
    width: 100%;
  }
  .dnkcc-btn {
    flex: 1 1 auto;
    text-align: center;
  }
}
