/* Cookie consent banner and settings dialog for greencode.ai.
   Self-hosted, no dependencies. Colours follow the theme: navy #07294d,
   green #0c8b51, Exo. Injected by scripts/apply-site-fixes.py. */

.gc-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483000;
  background: #07294d;
  color: #fff;
  font-family: Exo, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .25);
  transform: translateY(110%);
  transition: transform .3s ease;
}
.gc-consent[data-open="true"] { transform: none; }

.gc-consent__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}
/* The theme sets its own colour on p, label and small; win on specificity. */
.gc-consent .gc-consent__text, .gc-consent p, .gc-consent label, .gc-consent span,
.gc-consent .gc-consent__option span small, .gc-consent h2 { color: #fff; }
.gc-consent__text { flex: 1 1 420px; margin: 0; }
.gc-consent__text strong { color: #fff; }
.gc-consent__text a { color: #fff; text-decoration: underline; }
.gc-consent__text a:hover { color: #9fe0bf; }

.gc-consent__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.gc-consent__btn {
  appearance: none;
  border: 2px solid #0c8b51;
  border-radius: 4px;
  background: #0c8b51;
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  min-height: 44px;
}
.gc-consent__btn:hover, .gc-consent__btn:focus-visible { background: #0a7444; border-color: #0a7444; }
.gc-consent__btn--secondary { background: transparent; color: #fff; border-color: #9c9c9c; }
.gc-consent__btn--secondary:hover, .gc-consent__btn--secondary:focus-visible { background: rgba(255, 255, 255, .1); border-color: #fff; }
.gc-consent__btn:focus-visible { outline: 3px solid #9fe0bf; outline-offset: 2px; }

/* Settings view: one row per category */
.gc-consent__options { flex: 1 1 100%; display: grid; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
.gc-consent__option { display: flex; gap: 12px; align-items: flex-start; }
.gc-consent__option input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.gc-consent__option span small { display: block; opacity: .85; }

@media (max-width: 600px) {
  .gc-consent { font-size: 14px; }
  .gc-consent__inner { padding: 14px 16px; }
  .gc-consent__actions { width: 100%; }
  .gc-consent__btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .gc-consent { transition: none; }
}

/* Newsletter form response (overrides/assets/newsletter.js) */
.newsletter-form form[data-newsletter] .newsletter-fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.newsletter-form form[data-newsletter] input[type="email"] { flex: 1 1 240px; min-height: 50px; }
.form-response { margin: 12px 0 0; text-align: left; padding: 10px 14px; border-radius: 4px; font-size: 15px; }
.form-response[data-state="ok"] { background: #e3f6ec; color: #0a5a35; }
.form-response[data-state="error"] { background: #fde8e8; color: #8a1c1c; }
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cf-turnstile { margin: 6px 0; }
.newsletter-form .cf-turnstile { margin-top: 10px; }
