/* Cookie banner + settings modal (ck-*). Uses .dm-switch from demo.css when present;
   a copy of the switch styles lives here so the landing does not need demo.css. */
.ck-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 300;
  width: min(920px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: ck-rise 0.35s ease;
}
.ck-body { flex: 1; min-width: 0; }
.ck-title { font-weight: 650; margin-bottom: 4px; }
.ck-text { font-size: 14px; color: var(--text-2); line-height: 1.5; }
.ck-text a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.ck-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.ck-backdrop {
  position: fixed;
  inset: 0;
  z-index: 310;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(7, 11, 20, 0.55);
}
.ck-modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.ck-modal h3 { font-size: 22px; margin-bottom: 8px; }
.ck-modal .ck-actions { margin-top: 18px; }
.ck-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ck-row-title { font-weight: 600; }
.ck-row-text { font-size: 13.5px; color: var(--muted); }
.ck-always { font-size: 13px; font-weight: 600; color: var(--good-text); white-space: nowrap; }

.ck-switch { position: relative; width: 38px; height: 22px; flex: none; }
.ck-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ck-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background 0.2s; pointer-events: none; }
.ck-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.ck-switch input:checked + span { background: var(--accent); }
.ck-switch input:checked + span::after { transform: translateX(16px); }
.ck-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

@keyframes ck-rise { from { opacity: 0; transform: translate(-50%, 16px); } }

.ck-short { display: none; }

/* Phones: short copy, tight paddings, buttons share one row where they fit
   (banner stays under ~30% of the viewport height). */
@media (max-width: 720px) {
  .ck-banner {
    flex-direction: column; align-items: stretch; gap: 10px;
    bottom: 8px; width: calc(100vw - 16px); padding: 12px 14px; border-radius: 18px;
  }
  .ck-title { font-size: 14px; margin-bottom: 2px; }
  .ck-text { font-size: 13px; line-height: 1.4; }
  .ck-long { display: none; }
  .ck-short { display: inline; }
  .ck-actions { justify-content: stretch; gap: 6px; }
  .ck-actions .btn { flex: 1 1 auto; height: 38px; padding: 0 8px; font-size: 13px; }
}
@media (max-width: 380px) {
  .ck-banner { padding: 12px; }
  .ck-actions .btn { padding: 0 6px; font-size: 12.5px; }
}
