/* Cookie consent banner. Layout follows the supplied design; colours come
   from the existing 5sec.io tokens so it sits inside the brand. */

.cc-banner {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 200;
  width: min(440px, calc(100vw - 48px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
  animation: cc-rise 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes cc-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-banner { animation: none; }
}

.cc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cc-mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--foreground); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cc-title {
  font-size: 15px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--foreground); margin: 0;
}

.cc-body { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0 0 22px; }
.cc-body a { color: var(--accent-dark); }

.cc-actions { display: flex; gap: 12px; margin-bottom: 18px; }
.cc-btn {
  flex: 1 1 0;
  font: inherit; font-size: 15px; font-weight: 600;
  border-radius: 999px; padding: 13px 20px;
  cursor: pointer; text-align: center;
  transition: background 0.18s ease-out, border-color 0.18s ease-out, transform 0.1s ease-out;
}
.cc-btn:active { transform: translateY(1px); }
/* Reject carries the same weight as accept — a refusal must be as easy as
   a consent, so it is a peer button and never a buried link. */
.cc-btn-reject { background: #fff; color: var(--foreground); border: 1px solid var(--line); }
.cc-btn-reject:hover { border-color: var(--muted); }
.cc-btn-accept { background: var(--foreground); color: #fff; border: 1px solid var(--foreground); }
.cc-btn-accept:hover { background: #1e293b; }

.cc-manage {
  display: inline-block;
  font-size: 15px; font-weight: 600;
  color: var(--accent-dark);
  background: none; border: 0; padding: 0 0 8px;
  border-bottom: 1.5px solid var(--line);
  cursor: pointer; font-family: inherit;
}
.cc-manage:hover { border-bottom-color: var(--accent-dark); }

/* --- preferences panel --- */
.cc-prefs { margin: 4px 0 20px; border-top: 1px solid var(--line); padding-top: 4px; }
.cc-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.cc-row:last-child { border-bottom: 0; }
.cc-row-text { flex: 1; }
.cc-row-name { font-size: 14.5px; font-weight: 700; color: var(--foreground); margin: 0 0 3px; }
.cc-row-desc { font-size: 13.5px; line-height: 1.5; color: var(--muted); margin: 0; }

.cc-switch { position: relative; flex-shrink: 0; width: 44px; height: 26px; margin-top: 2px; }
.cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cc-track {
  position: absolute; inset: 0; border-radius: 999px;
  background: #CBD5E1; transition: background 0.2s ease-out; pointer-events: none;
}
.cc-track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  transition: transform 0.2s ease-out;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
}
.cc-switch input:checked + .cc-track { background: var(--accent); }
.cc-switch input:checked + .cc-track::after { transform: translateX(18px); }
.cc-switch input:focus-visible + .cc-track { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
.cc-switch input:disabled { cursor: not-allowed; }
.cc-switch input:disabled + .cc-track { background: var(--accent); opacity: 0.45; }

.cc-btn:focus-visible, .cc-manage:focus-visible {
  outline: 2px solid var(--accent-dark); outline-offset: 2px;
}

@media (max-width: 520px) {
  .cc-banner { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 22px; border-radius: 20px; }
  .cc-actions { flex-direction: column; }
}
