/*
 * Cookie-consent banner + settings modal (task 0144).
 * Brand-consistent (Kickbacks green), WCAG 2.1 AA: keyboard-operable, visible
 * focus, AA contrast, no render-blocking interstitial (the banner is a bottom
 * dialog that never covers primary content or blocks crawlers).
 */
.kb-cc-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 2147483000;
  max-width: 1080px;
  margin: 0 auto;
  background: #ffffff;
  color: #17181a;
  border: 1px solid #dbe6df;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 12px 34px rgba(16, 24, 40, .14);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}
.kb-cc-body {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  flex-wrap: wrap;
}
.kb-cc-body > div:first-child { flex: 1 1 340px; min-width: 260px; }
.kb-cc-text { margin: 0 0 6px; color: #40484f; }
.kb-cc-text a { color: #0d6d35; text-decoration: underline; }
.kb-cc-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

/* Equal-prominence Accept / Reject (EDPB banner taskforce): same size, weight,
 * hit-area. Reject is NOT visually demoted. */
.kb-cc-btn {
  font: inherit;
  font-weight: 640;
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  border: 1.5px solid transparent;
  min-width: 116px;
  min-height: 42px;
}
.kb-cc-accept { background: #188a45; color: #ffffff; border-color: #147a34; }
.kb-cc-accept:hover { background: #147a34; }
.kb-cc-reject { background: #ffffff; color: #17181a; border-color: #17181a; }
.kb-cc-reject:hover { background: #f2f5f3; }
.kb-cc-link {
  background: none;
  border: none;
  color: #0d6d35;
  text-decoration: underline;
  padding: 4px 0;
  min-width: 0;
  min-height: 0;
  font-weight: 600;
}
.kb-cc-btn:focus-visible,
.kb-cc-toggle:focus-visible,
.kb-cc-x:focus-visible {
  outline: 3px solid #1474e8;
  outline-offset: 2px;
}

/* ---- settings modal ---- */
.kb-cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  background: rgba(16, 24, 40, .48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}
.kb-cc-modal-panel {
  background: #ffffff;
  color: #17181a;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(16, 24, 40, .28);
  padding: 8px 24px 22px;
}
.kb-cc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 6px;
  border-bottom: 1px solid #edf3ef;
  position: sticky;
  top: 0;
  background: #ffffff;
}
.kb-cc-modal-title { font-size: 20px; margin: 0; color: #0d6d35; }
.kb-cc-x {
  font-size: 26px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: #6f7378;
  padding: 4px 8px;
  border-radius: 8px;
}
.kb-cc-x:hover { color: #17181a; }
.kb-cc-cat-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 2px;
  border-bottom: 1px solid #f2f5f3;
}
.kb-cc-cat-txt { flex: 1; }
.kb-cc-cat { display: block; cursor: pointer; }
.kb-cc-cat-name { display: block; font-weight: 680; font-size: 15px; }
.kb-cc-cat-desc { display: block; color: #5b636b; font-size: 13px; margin-top: 3px; }
.kb-cc-toggle {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: #188a45;
  cursor: pointer;
  flex: 0 0 auto;
}
.kb-cc-toggle:disabled { cursor: not-allowed; opacity: .7; }
.kb-cc-modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 18px;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .kb-cc-body { gap: 12px; }
  .kb-cc-actions { width: 100%; }
  .kb-cc-actions .kb-cc-btn { flex: 1; }
}

/* Respect reduced-motion; no animations that could disorient. */
@media (prefers-reduced-motion: no-preference) {
  .kb-cc-banner { animation: kb-cc-in .18s ease-out; }
  @keyframes kb-cc-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
}
