/* Jornada Reconexão — Cookie Consent UI */
:root {
  --jr-bg: #0d0d0d;
  --jr-bg2: #161616;
  --jr-acc: #C8A96E;
  --jr-acc-dim: rgba(200,169,110,0.15);
  --jr-acc-border: rgba(200,169,110,0.25);
  --jr-text: #F0E8DE;
  --jr-text-muted: rgba(240,232,222,0.6);
  --jr-radius: 12px;
  --jr-font: -apple-system, 'Segoe UI', system-ui, sans-serif;
}

/* ── BANNER ─────────────────────────────────── */
#jr-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: var(--jr-bg);
  border-top: 1px solid var(--jr-acc-border);
  padding: 16px 20px;
  font-family: var(--jr-font);
  color: var(--jr-text);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
}
#jr-cookie-banner .jr-banner-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
#jr-cookie-banner p {
  flex: 1;
  min-width: 200px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--jr-text-muted);
  margin: 0;
}
#jr-cookie-banner p a {
  color: var(--jr-acc);
  text-decoration: underline;
}
.jr-banner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── MODAL OVERLAY ──────────────────────────── */
#jr-cookie-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: var(--jr-font);
}
#jr-cookie-modal.jr-open {
  display: flex;
}
.jr-modal-box {
  background: var(--jr-bg);
  border: 1px solid var(--jr-acc-border);
  border-radius: var(--jr-radius);
  padding: 28px 24px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  color: var(--jr-text);
  position: relative;
}
.jr-modal-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--jr-acc);
  margin-bottom: 20px;
}
.jr-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--jr-text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
.jr-modal-close:hover, .jr-modal-close:focus {
  color: var(--jr-text);
  outline: 2px solid var(--jr-acc);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── COOKIE CATEGORIES ──────────────────────── */
.jr-category {
  border: 1px solid var(--jr-acc-border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--jr-bg2);
}
.jr-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.jr-category-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--jr-text);
}
.jr-category-desc {
  font-size: 0.77rem;
  color: var(--jr-text-muted);
  line-height: 1.45;
}
.jr-badge-always {
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--jr-acc);
  background: var(--jr-acc-dim);
  border: 1px solid var(--jr-acc-border);
  border-radius: 20px;
  padding: 2px 10px;
  white-space: nowrap;
}

/* ── TOGGLE ─────────────────────────────────── */
.jr-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.jr-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.jr-toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.jr-toggle input:checked + .jr-toggle-track {
  background: var(--jr-acc);
  border-color: var(--jr-acc);
}
.jr-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.jr-toggle input:checked + .jr-toggle-track::after {
  transform: translateX(20px);
}
.jr-toggle input:focus + .jr-toggle-track {
  outline: 2px solid var(--jr-acc);
  outline-offset: 2px;
}

/* ── BUTTONS ─────────────────────────────────── */
.jr-btn {
  font-family: var(--jr-font);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 9px 16px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s, background 0.15s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.jr-btn:focus {
  outline: 2px solid var(--jr-acc);
  outline-offset: 2px;
}
.jr-btn-primary {
  background: var(--jr-acc);
  color: #0d0d0d;
  border-color: var(--jr-acc);
}
.jr-btn-primary:hover { opacity: 0.88; }
.jr-btn-secondary {
  background: transparent;
  color: var(--jr-text-muted);
  border-color: rgba(255,255,255,0.18);
}
.jr-btn-secondary:hover {
  color: var(--jr-text);
  border-color: rgba(255,255,255,0.35);
}
.jr-btn-ghost {
  background: none;
  color: var(--jr-acc);
  border-color: var(--jr-acc-border);
  font-size: 0.78rem;
}
.jr-btn-ghost:hover {
  background: var(--jr-acc-dim);
}
.jr-modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
  justify-content: flex-end;
}

/* ── FOOTER LINK ─────────────────────────────── */
.jr-cookie-pref-link {
  display: inline-block;
  font-size: 0.75rem;
  color: rgba(240,232,222,0.4);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--jr-font);
  transition: color 0.15s;
}
.jr-cookie-pref-link:hover, .jr-cookie-pref-link:focus {
  color: var(--jr-acc);
  outline: none;
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 500px) {
  #jr-cookie-banner .jr-banner-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .jr-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .jr-btn { font-size: 0.77rem; padding: 8px 13px; }
  .jr-modal-box { padding: 22px 16px; }
  .jr-modal-actions { justify-content: stretch; }
  .jr-modal-actions .jr-btn { flex: 1; text-align: center; }
}
