/* ============================================================
   TechnocelGR — Cookie Consent (LGPD) — tema escuro premium
   Usa as variáveis de assets/css/technocel.css.
   ============================================================ */

.cc-noscroll { overflow: hidden; }

/* ---- Banner ---------------------------------------------------------- */
.cc-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 200%);
  width: min(1100px, calc(100% - 32px));
  z-index: 10000;
  background: var(--bg-card, #0f1520);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: transform .5s cubic-bezier(0.16, 1, 0.3, 1), opacity .4s ease, visibility .4s ease;
}
.cc-banner--visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}
.cc-banner__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
}
.cc-banner__text strong {
  display: block;
  color: var(--text-primary, #fff);
  font-size: 16px;
  margin-bottom: 4px;
}
.cc-banner__text p {
  margin: 0;
  color: var(--text-secondary, #8a9bb5);
  font-size: 14px;
  line-height: 1.55;
}
.cc-banner__text a {
  color: var(--accent-cyan, #06b6d4);
  text-decoration: underline;
}
.cc-banner__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---- Botões ---------------------------------------------------------- */
.cc-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: var(--radius-pill, 999px);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .25s ease;
  white-space: nowrap;
  line-height: 1;
}
.cc-btn--primary {
  background: var(--accent-gradient, linear-gradient(135deg, #2563eb, #06b6d4));
  color: #fff;
}
.cc-btn--primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
/* Mesmo peso visual do "Aceitar" (paridade ANPD aceitar/recusar) */
.cc-btn--solid {
  background: var(--bg-surface, #243044);
  color: var(--text-primary, #fff);
  border-color: var(--bg-surface, #243044);
}
.cc-btn--solid:hover { filter: brightness(1.15); transform: translateY(-1px); }
.cc-btn--ghost {
  background: transparent;
  color: var(--text-primary, #fff);
  border-color: var(--glass-border, rgba(255,255,255,0.12));
}
.cc-btn--ghost:hover { border-color: var(--accent-cyan, #06b6d4); color: var(--accent-cyan, #06b6d4); }
.cc-btn:focus-visible,
.cc-switch input:focus-visible + .cc-switch__slider {
  outline: 2px solid var(--accent-cyan, #06b6d4);
  outline-offset: 2px;
}

/* ---- Overlay + Modal ------------------------------------------------- */
.cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(5, 8, 14, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cc-overlay[hidden] { display: none; }

.cc-modal {
  width: min(640px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card, #0f1520);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
  border-radius: var(--radius-xl, 24px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.cc-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--glass-border, rgba(255,255,255,0.06));
}
.cc-modal__header h2 {
  font-size: 22px;
  margin: 0;
  color: var(--text-primary, #fff);
}
.cc-modal__close {
  background: none;
  border: none;
  color: var(--text-secondary, #8a9bb5);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.cc-modal__close:hover { color: var(--text-primary, #fff); }
.cc-modal__body { padding: 24px 28px; }
.cc-modal__intro {
  color: var(--text-secondary, #8a9bb5);
  font-size: 14px;
  margin: 0 0 20px;
}

/* ---- Categorias ------------------------------------------------------ */
.cc-cat {
  padding: 16px 0;
  border-top: 1px solid var(--glass-border, rgba(255,255,255,0.06));
}
.cc-cat:first-of-type { border-top: none; }
.cc-cat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.cc-cat__label {
  color: var(--text-primary, #fff);
  font-weight: 600;
  font-size: 15px;
}
.cc-cat__label em {
  color: var(--text-muted, #4a5568);
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
}
.cc-cat__desc {
  color: var(--text-secondary, #8a9bb5);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0;
  padding-left: 56px;
}

/* ---- Toggle switch --------------------------------------------------- */
.cc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cc-switch__slider {
  position: absolute; inset: 0;
  background: var(--bg-surface, #243044);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.12));
  border-radius: 999px;
  transition: background .25s ease;
}
.cc-switch__slider::before {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 50%;
  transition: transform .25s ease;
}
.cc-switch input:checked + .cc-switch__slider { background: var(--accent-cyan, #06b6d4); border-color: transparent; }
.cc-switch input:checked + .cc-switch__slider::before { transform: translate(20px, -50%); }
.cc-switch input:disabled { cursor: not-allowed; }
.cc-switch input:disabled + .cc-switch__slider { opacity: .6; }

.cc-modal__footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 20px 28px;
  border-top: 1px solid var(--glass-border, rgba(255,255,255,0.06));
}

/* ---- Responsivo ------------------------------------------------------ */
@media (max-width: 768px) {
  .cc-banner__inner { flex-direction: column; align-items: stretch; gap: 16px; }
  .cc-banner__actions { justify-content: stretch; }
  .cc-banner__actions .cc-btn { flex: 1 1 auto; text-align: center; }
  .cc-cat__desc { padding-left: 0; }
  .cc-modal__footer .cc-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner { transition: opacity .2s ease, visibility .2s ease; }
}

/* ============================================================
   Formulários LGPD (contato + portal do titular) — compartilhado
   ============================================================ */
.form-alert {
  padding: 14px 18px;
  border-radius: var(--radius-md, 12px);
  margin-bottom: var(--space-md, 24px);
  font-size: 15px;
  border: 1px solid transparent;
}
.form-alert--sucesso {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.4);
  color: #4ade80;
}
.form-alert--erro {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}
.form-alert strong { color: inherit; }

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary, #8a9bb5);
  cursor: pointer;
}
.consent-check input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--accent-cyan, #06b6d4);
  cursor: pointer;
}
.consent-check a { color: var(--accent-cyan, #06b6d4); text-decoration: underline; }
