/* ==========================================================================
   TechAid — Cookie consent banner (slim full-width bar at the bottom of the screen)
   Loaded on every page by includes/head.php while a Google Analytics ID is set.
   Markup: includes/footer.php (#consent).  Behaviour: assets/js/consent.js (shows it only in the EEA, UK and Switzerland).
   ========================================================================== */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  padding: var(--space-3) 0 calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  background: var(--color-card);
  border-top: 1px solid var(--color-line);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
  animation: consent-in 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.consent[hidden] { display: none; }
.consent:focus { outline: none; }

/* one row: text on the left, buttons on the right, lined up with the page content (.container) */
.consent-inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.consent-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--color-muted);
}
.consent-text strong { color: var(--color-ink); }
.consent-text a {
  color: var(--color-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.consent-text a:hover { color: var(--color-brand); }

/* Accept and Reject are the same size and weight on purpose (equal prominence) */
.consent-actions { display: flex; flex: none; gap: var(--space-2); }
.consent-actions .btn { padding: 8px 18px; white-space: nowrap; text-align: center; }

/* "Cookie settings" link in the footer's legal row */
.footer-legal .consent-open {
  color: var(--color-on-dark-soft);
  font-size: inherit;
  padding: 4px 0;
  margin: -4px 0;
  transition: color 0.2s ease;
}
.footer-legal .consent-open:hover { color: var(--color-brand); }

@keyframes consent-in {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .consent { animation: none; }
}
@media (max-width: 720px) {
  .consent-inner { flex-direction: column; align-items: stretch; gap: var(--space-3); }
  .consent-text { font-size: var(--text-xs); }
  .consent-actions .btn { flex: 1; }
}
@media print {
  .consent { display: none; }
}
