/* ============================================================
   VENTURE CAFÉ 3.0 — COOKIE CONSENT
   On-brand replacement for the third-party consent banner.
   Uses the site design tokens (site.css :root) so it inherits
   the per-café accent pair, fonts, radii and shadows.
   ============================================================ */

#vc-consent[hidden] { display: none; }

#vc-consent {
  position: fixed;
  z-index: 9000;
  inset: auto 0 0 0;
  font-family: var(--vc-font-body, sans-serif);
  color: var(--vc-ink, #1a1d21);
}

/* ── Banner (bottom-left floating card, full-width on mobile) ── */
.vc-consent-banner {
  position: fixed;
  left: clamp(16px, 4vw, 32px);
  bottom: clamp(16px, 4vw, 32px);
  width: min(440px, calc(100vw - 32px));
  background: var(--vc-paper, #fff);
  border-radius: var(--vc-radius-md, 18px);
  box-shadow: var(--vc-shadow-lg, 0 30px 70px rgba(26, 29, 33, 0.18));
  overflow: hidden;
  animation: vc-consent-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.vc-consent-banner[hidden] { display: none; }

/* Brand frame line across the top — the network/accent gradient. */
.vc-consent-banner::before,
.vc-consent-panel::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--vc-frame-gradient, linear-gradient(90deg, var(--vc-primary), var(--vc-secondary)));
}

.vc-consent-body { padding: clamp(20px, 3vw, 26px); }

.vc-consent-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.vc-consent-text {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--vc-ink-soft, #4a4e54);
}
.vc-consent-text a {
  color: var(--vc-primary-deep, var(--vc-primary));
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Buttons ── */
.vc-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.vc-consent-btn {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 11px 18px;
  border: 1.5px solid transparent;
  border-radius: var(--vc-radius-pill, 999px);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
  text-align: center;
}
.vc-consent-btn:hover { transform: translateY(-2px); }
.vc-consent-btn:focus-visible {
  outline: 2px solid var(--vc-primary-deep, var(--vc-primary));
  outline-offset: 2px;
}

.vc-consent-btn--accept {
  background: var(--vc-primary, #95cd31);
  color: var(--vc-ink, #1a1d21);
}
.vc-consent-btn--accept:hover {
  background: var(--vc-ink, #1a1d21);
  color: var(--vc-primary, #95cd31);
}
.vc-consent-btn--reject {
  background: var(--vc-paper-warm, #f2f3f5);
  color: var(--vc-ink, #1a1d21);
}
.vc-consent-btn--reject:hover { background: var(--vc-rule, #e4e6ea); }

.vc-consent-btn--ghost {
  flex: 0 0 auto;
  min-width: 0;
  background: transparent;
  color: var(--vc-mute, #71767e);
  padding: 11px 4px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.vc-consent-btn--ghost:hover {
  color: var(--vc-ink, #1a1d21);
  transform: none;
}

/* ── Preferences panel (centred modal) ── */
.vc-consent-panel {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(26, 29, 33, 0.55);
  backdrop-filter: blur(3px);
  animation: vc-consent-fade 0.25s ease both;
}
.vc-consent-panel[hidden] { display: none; }

.vc-consent-card {
  width: min(560px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: var(--vc-paper, #fff);
  border-radius: var(--vc-radius-lg, 28px);
  box-shadow: var(--vc-shadow-lg, 0 30px 70px rgba(26, 29, 33, 0.2));
  overflow-x: hidden;
}
.vc-consent-card::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--vc-frame-gradient, linear-gradient(90deg, var(--vc-primary), var(--vc-secondary)));
}
.vc-consent-card-body { padding: clamp(24px, 4vw, 34px); }

.vc-consent-panel-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.vc-consent-panel-intro {
  margin: 0 0 22px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--vc-ink-soft, #4a4e54);
}

/* ── Category rows ── */
.vc-consent-cat {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--vc-rule, #e4e6ea);
}
.vc-consent-cat-text { flex: 1 1 auto; }
.vc-consent-cat-name {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 700;
}
.vc-consent-cat-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--vc-mute, #71767e);
}

/* Switch */
.vc-consent-switch { flex: 0 0 auto; position: relative; width: 46px; height: 26px; }
.vc-consent-switch input {
  position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer;
}
.vc-consent-track {
  position: absolute; inset: 0;
  background: var(--vc-rule, #e4e6ea);
  border-radius: 999px;
  transition: background 0.2s ease;
  pointer-events: none;
}
.vc-consent-track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--vc-paper, #fff);
  box-shadow: var(--vc-shadow-sm, 0 2px 6px rgba(0, 0, 0, 0.2));
  transition: transform 0.2s ease;
}
.vc-consent-switch input:checked + .vc-consent-track {
  background: var(--vc-primary, #95cd31);
}
.vc-consent-switch input:checked + .vc-consent-track::after { transform: translateX(20px); }
.vc-consent-switch input:focus-visible + .vc-consent-track {
  outline: 2px solid var(--vc-primary-deep, var(--vc-primary));
  outline-offset: 2px;
}
.vc-consent-switch input:disabled + .vc-consent-track {
  background: var(--vc-primary, #95cd31);
  opacity: 0.55;
}
.vc-consent-switch input:disabled { cursor: not-allowed; }

.vc-consent-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

@media (max-width: 560px) {
  .vc-consent-actions { flex-direction: column; }
  .vc-consent-btn, .vc-consent-btn--ghost { width: 100%; }
}

@keyframes vc-consent-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes vc-consent-fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .vc-consent-banner, .vc-consent-panel { animation: none; }
  .vc-consent-btn:hover { transform: none; }
}
