/* ─────────────────────────────────────────────────────────────
   PROVES.IO — cookie consent banner and preferences
   Shared by every page. Inherits the site design tokens
   (--bg, --text-primary, --red, ...) with safe fallbacks.
   ───────────────────────────────────────────────────────────── */

.cc-banner,
.cc-modal-backdrop {
  font-family: var(--font-body, "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

/* ── Banner ─────────────────────────────────────────────────── */
.cc-banner {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 10050;
  width: min(1080px, calc(100% - 2rem));
  transform: translate(-50%, 0);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.75rem;
  align-items: center;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--border, rgba(10, 10, 10, 0.1));
  border-radius: 1.25rem;
  background: var(--bg, #fff);
  box-shadow: 0 24px 60px -28px rgba(10, 10, 10, 0.45);
  animation: ccRise 0.45s var(--ease-out, cubic-bezier(0.25, 0.46, 0.45, 0.94)) both;
}

[data-theme="dark"] .cc-banner {
  background: var(--bg-raised, #1a1a1a);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.75);
}

.cc-banner[hidden] {
  display: none;
}

@keyframes ccRise {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.cc-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text-primary, #060606);
}

.cc-text {
  margin: 0;
  max-width: 62ch;
  color: var(--text-secondary, #1a1a1a);
  font-size: 0.9rem;
  line-height: 1.6;
}

.cc-text a {
  color: var(--text-primary, #060606);
  text-decoration: underline;
  text-decoration-color: rgba(224, 74, 63, 0.5);
  text-underline-offset: 2px;
}

.cc-text a:hover {
  color: var(--red, #e04a3f);
}

.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

/* Buttons. Accept and reject are deliberately the same size and
   weight: under PECR, refusing must be as easy as accepting. */
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.4rem;
  border-radius: 100px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s,
              transform 0.25s var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
}

.cc-btn:hover { transform: translateY(-2px); }
.cc-btn:active { transform: translateY(0); }

.cc-btn:focus-visible {
  outline: 2px solid var(--red-vivid, #f23d33);
  outline-offset: 3px;
}

.cc-btn--accept {
  background: var(--red-vivid, #f23d33);
  color: #fff;
  box-shadow: 0 4px 18px rgba(242, 61, 51, 0.28);
}

.cc-btn--accept:hover { background: #e5362c; }

.cc-btn--reject {
  background: transparent;
  border-color: var(--border-mid, rgba(10, 10, 10, 0.18));
  color: var(--text-primary, #060606);
}

.cc-btn--reject:hover {
  border-color: var(--red, #e04a3f);
  background: var(--bg-surface, #efede7);
}

[data-theme="dark"] .cc-btn--reject:hover {
  background: rgba(255, 255, 255, 0.05);
}

.cc-btn--link {
  min-height: 0;
  padding: 0.5rem 0.25rem;
  background: none;
  border: 0;
  color: var(--text-muted, #555049);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(224, 74, 63, 0.45);
  text-underline-offset: 3px;
}

.cc-btn--link:hover {
  color: var(--red, #e04a3f);
  transform: none;
}

/* ── Preferences modal ──────────────────────────────────────── */
.cc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: ccFade 0.25s var(--ease-out, ease) both;
}

.cc-modal-backdrop[hidden] { display: none; }

@keyframes ccFade { from { opacity: 0; } to { opacity: 1; } }

.cc-modal {
  width: min(620px, 100%);
  max-height: min(84vh, 760px);
  overflow-y: auto;
  padding: 2rem;
  border: 1px solid var(--border, rgba(10, 10, 10, 0.1));
  border-radius: 1.35rem;
  background: var(--bg, #fff);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .cc-modal { background: var(--bg-raised, #1a1a1a); }

.cc-modal .cc-title { font-size: 1.65rem; }

.cc-modal-intro {
  margin: 0 0 1.5rem;
  color: var(--text-secondary, #1a1a1a);
  font-size: 0.925rem;
  line-height: 1.65;
}

.cc-group {
  padding: 1.1rem 0;
  border-top: 1px solid var(--border, rgba(10, 10, 10, 0.1));
}

.cc-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cc-group-name {
  margin: 0;
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text-primary, #060606);
}

.cc-group-desc {
  margin: 0.45rem 0 0;
  color: var(--text-muted, #555049);
  font-size: 0.85rem;
  line-height: 1.6;
}

.cc-locked {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted, #555049);
  white-space: nowrap;
}

/* Switch */
.cc-switch {
  position: relative;
  flex-shrink: 0;
  width: 46px;
  height: 26px;
}

.cc-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.cc-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: var(--bg-overlay, #e7e4dc);
  border: 1px solid var(--border-mid, rgba(10, 10, 10, 0.18));
  transition: background 0.25s, border-color 0.25s;
  pointer-events: none;
}

[data-theme="dark"] .cc-switch-track { background: rgba(255, 255, 255, 0.1); }

.cc-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
}

.cc-switch input:checked + .cc-switch-track {
  background: var(--red-vivid, #f23d33);
  border-color: var(--red-vivid, #f23d33);
}

.cc-switch input:checked + .cc-switch-track::after { transform: translateX(20px); }

.cc-switch input:focus-visible + .cc-switch-track {
  outline: 2px solid var(--red-vivid, #f23d33);
  outline-offset: 3px;
}

.cc-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border, rgba(10, 10, 10, 0.1));
}

/* ── Blocked embed placeholder ──────────────────────────────── */
.cc-placeholder {
  display: grid;
  place-items: center;
  gap: 0.85rem;
  min-height: 420px;
  padding: 2.5rem 1.75rem;
  border: 1px dashed var(--border-mid, rgba(10, 10, 10, 0.18));
  border-radius: 1.15rem;
  background: var(--bg-raised, #f7f6f2);
  text-align: center;
}

[data-theme="dark"] .cc-placeholder { background: rgba(255, 255, 255, 0.02); }

.cc-placeholder-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid rgba(242, 61, 51, 0.3);
  color: var(--red, #e04a3f);
}

.cc-placeholder-icon svg { width: 1.25rem; height: 1.25rem; }

.cc-placeholder-title {
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary, #060606);
}

.cc-placeholder-text {
  margin: 0;
  max-width: 44ch;
  color: var(--text-secondary, #1a1a1a);
  font-size: 0.9rem;
  line-height: 1.6;
}

.cc-settings-link {
  padding: 0;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary, #1a1a1a);
  cursor: pointer;
  transition: color 0.2s;
}

.cc-settings-link:hover { color: var(--red, #e04a3f); }

.cc-settings-link:focus-visible {
  outline: 2px solid var(--red-vivid, #f23d33);
  outline-offset: 3px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .cc-banner {
    grid-template-columns: 1fr;
    gap: 1.1rem;
    padding: 1.35rem 1.35rem 1.5rem;
  }
  .cc-actions { width: 100%; }
  .cc-btn--accept,
  .cc-btn--reject { flex: 1 1 auto; }
  .cc-btn--link { width: 100%; }
  .cc-modal { padding: 1.5rem 1.35rem; }
  .cc-placeholder { min-height: 340px; padding: 2rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner,
  .cc-modal-backdrop { animation: none; }
  .cc-btn,
  .cc-switch-track,
  .cc-switch-track::after { transition: none; }
  .cc-btn:hover { transform: none; }
}
