/* ============================================
   JAMES FLOW — Cookie Consent (LGPD/GDPR)
   Banner first-level + modal granular
   ============================================ */

.jf-cc-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 720px; margin: 0 auto;
  background: #1c1c1e; color: #f5f5f7;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.45);
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: none;
  animation: jf-cc-slide-up .35s ease both;
}
.jf-cc-banner.show { display: block; }

@keyframes jf-cc-slide-up {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.jf-cc-banner h3 {
  font-size: 1rem; font-weight: 600; margin: 0 0 6px;
}
.jf-cc-banner p {
  font-size: 0.88rem; line-height: 1.55; opacity: .85;
  margin: 0 0 14px;
}
.jf-cc-banner p a { color: #3b82f6; text-decoration: underline; }

.jf-cc-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.jf-cc-btn {
  flex: 1 1 auto; min-width: 130px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  background: transparent; color: #f5f5f7;
  font-size: 0.88rem; font-weight: 500;
  cursor: pointer; font-family: inherit;
  transition: background .15s, border-color .15s;
}
.jf-cc-btn:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.28); }
.jf-cc-btn-primary {
  background: #3b82f6; border-color: #3b82f6; color: #fff;
}
.jf-cc-btn-primary:hover { background: #2563eb; border-color: #2563eb; }

/* Modal de preferências granulares */
.jf-cc-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.66);
  z-index: 10000;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  animation: jf-cc-fade-in .2s ease both;
}
.jf-cc-modal-overlay.show { display: flex; }

@keyframes jf-cc-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.jf-cc-modal {
  background: #1c1c1e; color: #f5f5f7;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 28px;
  max-width: 540px; width: 100%;
  max-height: 86vh; overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.jf-cc-modal h2 {
  font-size: 1.2rem; font-weight: 600; margin: 0 0 8px;
}
.jf-cc-modal > p {
  font-size: 0.88rem; line-height: 1.55; opacity: .85;
  margin: 0 0 18px;
}

.jf-cc-cat {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 16px 0;
}
.jf-cc-cat-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.jf-cc-cat-head h4 {
  font-size: 0.95rem; font-weight: 600; margin: 0;
}
.jf-cc-cat-desc {
  font-size: 0.83rem; line-height: 1.55; opacity: .72;
  margin-top: 6px;
}

/* Toggle switch */
.jf-cc-switch {
  position: relative; width: 40px; height: 22px;
  background: rgba(255,255,255,0.16); border-radius: 11px;
  cursor: pointer; transition: background .2s;
  flex-shrink: 0;
}
.jf-cc-switch::after {
  content: ""; position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: #fff; border-radius: 50%;
  transition: transform .2s;
}
.jf-cc-switch.on { background: #3b82f6; }
.jf-cc-switch.on::after { transform: translateX(18px); }
.jf-cc-switch.disabled { opacity: .55; cursor: not-allowed; }

.jf-cc-modal-actions {
  display: flex; gap: 8px;
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.jf-cc-modal-actions .jf-cc-btn { flex: 1; }

/* Botão "Preferências de cookies" no rodapé (revogar a qualquer momento — exigência LGPD) */
.jf-cc-footer-link {
  background: none; border: none;
  color: inherit; font-size: 0.88rem;
  cursor: pointer; padding: 0; margin: 0;
  text-decoration: none; font-family: inherit;
  opacity: .75;
}
.jf-cc-footer-link:hover { opacity: 1; text-decoration: underline; }

/* Mobile: banner full-width inferior */
@media (max-width: 600px) {
  .jf-cc-banner {
    left: 8px; right: 8px; bottom: 8px;
    padding: 16px 18px;
    border-radius: 12px;
  }
  .jf-cc-actions { flex-direction: column; }
  .jf-cc-btn { width: 100%; }
}
