/* Cookie consent / LGPD */
.cookie-consent {
  position: fixed;
  z-index: 200;
  left: 18px;
  right: 18px;
  bottom: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(27,45,61,.18);
}
.cookie-consent-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.cookie-consent-copy { flex: 1; min-width: 0; }
.cookie-consent-title { font-size: 15px; font-weight: 900; margin-bottom: 5px; }
.cookie-consent-copy p, .cookie-modal-intro, .cookie-policy-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.cookie-consent-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  flex: none;
}
.cookie-btn {
  min-height: 38px;
  border-radius: 9px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.cookie-btn-secondary { background: #fff; color: var(--ink); }
.cookie-btn-secondary:hover { border-color: var(--blue); color: var(--blue); }
.cookie-btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.cookie-btn-primary:hover { background: #006da8; border-color: #006da8; }
.cookie-link {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.cookie-link:hover { text-decoration: underline; }

.cookie-modal[hidden], .cookie-consent[hidden], .cookie-privacy-button[hidden] { display: none; }
.cookie-modal { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 18px; }
.cookie-modal-backdrop { position: absolute; inset: 0; background: rgba(12,24,34,.58); backdrop-filter: blur(3px); }
.cookie-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,.22);
  padding: 22px;
}
.cookie-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.cookie-modal-header h2 { margin: 3px 0 0; font-size: 22px; letter-spacing: -.03em; }
.cookie-modal-close {
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink); cursor: pointer; font-size: 24px; line-height: 1;
}
.cookie-modal-close:hover { color: var(--blue); border-color: var(--blue); }
.cookie-modal-intro { margin-top: 12px; }
.cookie-category {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 15px 0; border-bottom: 1px solid var(--line);
}
.cookie-category strong { font-size: 13px; }
.cookie-category p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.cookie-always-on { color: #5d6872; font-size: 11px; font-weight: 800; white-space: nowrap; }
.cookie-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.cookie-switch input { position: absolute; opacity: 0; pointer-events: none; }
.cookie-switch span {
  position: relative; width: 42px; height: 24px; border-radius: 999px; background: #cbd3da;
  transition: background .16s ease;
}
.cookie-switch span::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,.2); transition: transform .16s ease;
}
.cookie-switch input:checked + span { background: var(--blue); }
.cookie-switch input:checked + span::after { transform: translateX(18px); }
.cookie-switch b { font-size: 11px; color: var(--ink); }
.cookie-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.cookie-policy-note { margin-top: 14px; font-size: 10px; }

.cookie-privacy-button {
  position: fixed;
  z-index: 190;
  left: 14px;
  bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  color: var(--ink);
  box-shadow: 0 7px 22px rgba(27,45,61,.14);
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.cookie-privacy-button:hover { color: var(--blue); border-color: var(--blue); }
body.cookie-modal-open { overflow: hidden; }

@media (max-width: 800px) {
  .cookie-consent { left: 10px; right: 10px; bottom: 10px; }
  .cookie-consent-inner { align-items: stretch; flex-direction: column; gap: 12px; padding: 15px; }
  .cookie-consent-actions { justify-content: stretch; }
  .cookie-consent-actions .cookie-btn { flex: 1 1 30%; }
}
@media (max-width: 560px) {
  .cookie-consent-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cookie-consent-actions .cookie-btn-primary { grid-column: 1 / -1; }
  .cookie-modal { padding: 10px; }
  .cookie-modal-dialog { max-height: calc(100vh - 20px); padding: 18px; }
  .cookie-category { align-items: flex-start; flex-direction: column; }
  .cookie-modal-actions { display: grid; grid-template-columns: 1fr; }
  .cookie-modal-actions .cookie-btn { width: 100%; }
}
