/* ═══════════════════════════════════════════════════════════════
   ReconAI — cookies.css
   PIPEDA + Quebec Law 25 compliant cookie consent banner.
═══════════════════════════════════════════════════════════════ */

#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9100;
  background: #07090f;
  border-top: 1px solid rgba(50, 85, 200, 0.26);
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-family: 'DM Sans', sans-serif;
  box-shadow: 0 -10px 48px rgba(0, 0, 0, 0.65);
  transition: transform 0.42s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.42s ease;
}
#cookie-banner.cookie-hidden {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

.cookie-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.cookie-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  line-height: 1;
}

.cookie-text h3 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 6px;
  font-weight: 400;
}
.cookie-text p {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 540px;
}
.cookie-text p a {
  color: var(--blue);
  text-decoration: none;
}
.cookie-text p a:hover { text-decoration: underline; }

/* Expandable categories */
.cookie-categories {
  margin-top: 14px;
  display: none;
  flex-direction: column;
  gap: 10px;
}
.cookie-categories.open { display: flex; }

.cookie-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(50,85,200,0.14);
  border-radius: 4px;
  padding: 10px 14px;
  gap: 14px;
}
.cookie-cat-info { flex: 1; }
.cookie-cat-name {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.66rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 2px;
}
.cookie-cat-desc {
  font-size: 0.69rem;
  color: var(--muted);
  line-height: 1.55;
}
.cookie-cat-required {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.63rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  width: 38px; height: 22px;
  flex-shrink: 0;
}
.cookie-toggle input {
  opacity: 0; width: 0; height: 0;
  position: absolute;
}
.cookie-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--surface-2);
  border: 1px solid rgba(50,85,200,0.22);
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}
.cookie-toggle-slider::after {
  content: '';
  position: absolute;
  left: 3px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  background: var(--muted);
  border-radius: 50%;
  transition: left 0.25s, background 0.25s;
}
.cookie-toggle input:checked + .cookie-toggle-slider {
  background: rgba(0,118,188,0.22);
  border-color: var(--blue);
}
.cookie-toggle input:checked + .cookie-toggle-slider::after {
  left: 19px;
  background: var(--blue);
}
.cookie-toggle input:disabled + .cookie-toggle-slider {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Action buttons */
.cookie-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  min-width: 154px;
}
.cookie-btn {
  padding: 9px 18px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: opacity 0.2s, background 0.2s, border-color 0.2s;
}
.cookie-btn:hover { opacity: 0.85; }
.cookie-btn-accept {
  background: var(--accent);
  color: var(--white);
  border: 1px solid transparent;
}
.cookie-btn-essential {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(50,85,200,0.22);
}
.cookie-btn-essential:hover { color: var(--text); border-color: rgba(50,85,200,0.45); opacity: 1; }
.cookie-btn-manage {
  background: transparent;
  color: var(--blue);
  border: 1px solid rgba(0,118,188,0.28);
  font-size: 0.69rem;
}
.cookie-btn-manage:hover { border-color: var(--blue); opacity: 1; }
.cookie-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.cookie-toggle input:focus-visible + .cookie-toggle-slider {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 860px) {
  #cookie-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 20px;
    gap: 14px;
  }
  .cookie-text p { max-width: 100%; }
  .cookie-actions { flex-direction: row; min-width: unset; }
  .cookie-btn { flex: 1; text-align: center; padding: 10px 10px; }
}
@media (max-width: 520px) {
  .cookie-actions { flex-direction: column; }
  .cookie-icon { display: none; }
}
