/* KOU Cookie Consent. (C) 2026 Kind of Useful. GNU General Public License version 2 or later. */

.kou-cc, .kou-cc-prefs, .kou-cc-reopen, .kou-cc-embed {
  --kou-cc-bg: #ffffff;
  --kou-cc-text: #1d2125;
  --kou-cc-accent: #1f5fbf;
  --kou-cc-radius: 10px;
  font: 400 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--kou-cc-text);
  box-sizing: border-box;
}
.kou-cc *, .kou-cc-prefs *, .kou-cc-embed * { box-sizing: border-box; }

.kou-cc {
  position: fixed;
  z-index: 2147483000;
  background: var(--kou-cc-bg);
  box-shadow: 0 6px 30px rgba(0, 0, 0, .22);
}
.kou-cc-inner { padding: 20px 22px; }
.kou-cc-title { margin: 0 0 6px; font-size: 1.1em; font-weight: 700; line-height: 1.3; color: inherit; }
.kou-cc-message { margin: 0 0 14px; }
.kou-cc a, .kou-cc-prefs a { color: var(--kou-cc-accent); text-decoration: underline; }

.kou-cc--box-left, .kou-cc--box-right { bottom: 16px; width: min(420px, calc(100vw - 32px)); border-radius: var(--kou-cc-radius); }
.kou-cc--box-left { left: 16px; }
.kou-cc--box-right { right: 16px; }
.kou-cc--bar-bottom, .kou-cc--bar-top { left: 0; right: 0; }
.kou-cc--bar-bottom { bottom: 0; }
.kou-cc--bar-top { top: 0; }
.kou-cc--bar-bottom .kou-cc-inner, .kou-cc--bar-top .kou-cc-inner { max-width: 1200px; margin: 0 auto; }

.kou-cc-backdrop {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, .45);
}
.kou-cc--modal { position: relative; width: min(520px, 100%); border-radius: var(--kou-cc-radius); }

/* Framework panel classes (.card, .uk-card, .callout) set position: relative and load after this
   file; keep the banner fixed (and the modal box relative inside its backdrop). */
.kou-cc.kou-cc--template { position: fixed; }
.kou-cc.kou-cc--template.kou-cc--modal { position: relative; }

.kou-cc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kou-cc--bar-bottom .kou-cc-actions, .kou-cc--bar-top .kou-cc-actions { justify-content: flex-end; }

/* Accept and Reject look the same on purpose: the ICO expects refusing to be as easy as agreeing.
   .kou-cc-btn is layout only; .kou-cc-btn--own is our look, used unless the template's own button
   classes (UIkit, Bootstrap, Foundation or the admin's) are on the button. */
.kou-cc-btn { flex: 1 1 auto; min-height: 44px; cursor: pointer; }
.kou-cc-btn--own {
  padding: 10px 18px;
  border: 2px solid var(--kou-cc-accent); border-radius: var(--kou-cc-btn-radius, 6px);
  font: inherit; font-weight: 600;
  transition: filter .15s;
}
.kou-cc-btn--own.kou-cc-btn--primary { background: var(--kou-cc-accent); color: var(--kou-cc-btn-text, #fff); }
.kou-cc-btn--own.kou-cc-btn--secondary { background: transparent; color: var(--kou-cc-accent); }
.kou-cc-btn--own:hover { filter: brightness(1.08); }

/* "Match my template": the template's font, and its card/panel look when one is used. */
.kou-cc.kou-cc--template, .kou-cc-prefs.kou-cc--template, .kou-cc-embed.kou-cc--template { font-family: inherit; font-size: 1rem; }
.kou-cc--template.uk-card, .kou-cc--template.card, .kou-cc--template.callout { margin: 0; }
.kou-cc-probe { position: absolute !important; left: -9999px !important; top: 0 !important; visibility: hidden !important; pointer-events: none !important; }
.kou-cc-btn:focus-visible, .kou-cc-close:focus-visible, .kou-cc-reopen:focus-visible, .kou-cc-link:focus-visible,
.kou-cc-switch input:focus-visible + .kou-cc-slider {
  outline: 3px solid var(--kou-cc-accent); outline-offset: 2px;
}
.kou-cc-link { background: none; border: 0; padding: 0; font: inherit; color: var(--kou-cc-accent); text-decoration: underline; cursor: pointer; }

/* Settings dialog */
.kou-cc-prefs {
  width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  padding: 0; border: 0; border-radius: var(--kou-cc-radius);
  background: var(--kou-cc-bg); box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
  z-index: 2147483001;
}
.kou-cc-prefs[open] { display: flex; flex-direction: column; }
.kou-cc-prefs:not([open]) { display: none; }
.kou-cc-prefs::backdrop { background: rgba(0, 0, 0, .45); }
.kou-cc-prefs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 10px; }
.kou-cc-prefs-head h2 { margin: 0; font-size: 1.2em; color: inherit; }
.kou-cc-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
.kou-cc-prefs-body { padding: 0 22px; overflow-y: auto; }
.kou-cc-prefs-body > p { margin: 0 0 12px; }
.kou-cc-prefs-foot { padding: 14px 22px 20px; border-top: 1px solid rgba(127, 127, 127, .25); }
.kou-cc-cat { padding: 12px 0; border-top: 1px solid rgba(127, 127, 127, .25); }
.kou-cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kou-cc-cat-title { margin: 0; font-size: 1em; font-weight: 700; color: inherit; }
.kou-cc-cat-desc, .kou-cc-cat-uses { margin: 4px 0 0; font-size: .93em; }
.kou-cc-cat-uses { opacity: .8; }
.kou-cc-always { font-size: .85em; font-weight: 600; color: var(--kou-cc-accent); white-space: nowrap; }

.kou-cc-switch { position: relative; display: inline-block; flex: 0 0 auto; width: 48px; height: 28px; }
.kou-cc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.kou-cc-slider { position: absolute; inset: 0; border-radius: 28px; background: #8a8f98; transition: background .15s; }
.kou-cc-slider::before { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.kou-cc-switch input:checked + .kou-cc-slider { background: var(--kou-cc-accent); }
.kou-cc-switch input:checked + .kou-cc-slider::before { transform: translateX(20px); }

/* Reopen button */
.kou-cc-reopen {
  position: fixed; bottom: 16px; z-index: 2147482999;
  width: 44px; height: 44px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: var(--kou-cc-bg); color: var(--kou-cc-accent);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .25); cursor: pointer;
}
.kou-cc-reopen--left { left: 16px; }
.kou-cc-reopen--right { right: 16px; }

/* Placeholder for a blocked embed */
.kou-cc-embed {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 200px; padding: 20px; margin: 0 0 1em;
  text-align: center; border-radius: 6px;
  background: rgba(127, 127, 127, .12); border: 1px dashed rgba(127, 127, 127, .5);
}
.kou-cc-embed p { margin: 0; max-width: 46ch; }
.kou-cc-embed-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.kou-cc-embed .kou-cc-btn { flex: 0 0 auto; }

/* Cookie table ({koucookietable}) */
.kou-cc-table-scroll { overflow-x: auto; margin-bottom: 1.5em; }
.kou-cc-table table { width: 100%; border-collapse: collapse; }
.kou-cc-table th, .kou-cc-table td { text-align: left; vertical-align: top; padding: 6px 10px; border-bottom: 1px solid rgba(127, 127, 127, .3); }
.kou-cc-table code { white-space: nowrap; }

.kou-cc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 560px) {
  .kou-cc--box-left, .kou-cc--box-right { left: 8px; right: 8px; bottom: 8px; width: auto; }
  .kou-cc-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .kou-cc-slider, .kou-cc-slider::before, .kou-cc-btn { transition: none; }
}
@media print { .kou-cc, .kou-cc-backdrop, .kou-cc-reopen { display: none !important; } }
