/* Mentex Cookie-Consent-Banner
   --------------------------------------------------------------
   Wird global (auf jeder Seite) per main.py injiziert, damit der
   Banner aus static/js/consent.js auf Landing, Login, Dashboard,
   Admin sowie Print-/Präsentations-Views einheitlich im
   Mentex-Design erscheint. Werte (Farben, Radien, Schatten) sind
   bewusst auf die Variablen aus theme.css abgestimmt, aber
   hartkodiert, damit das Styling auch ohne theme.css greift. */

.mtx-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: #0C1220;
  color: #F5F5F5;
  border-top: 1px solid rgba(197, 160, 89, 0.4);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);
  padding: 1rem 1.25rem;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  display: none;
}

.mtx-consent[hidden] { display: none !important; }
.mtx-consent.is-visible { display: block; }

.mtx-consent__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.mtx-consent__text {
  flex: 1 1 320px;
  min-width: 240px;
  color: #F5F5F5;
}

.mtx-consent__link {
  color: #C5A059;
  text-decoration: underline;
  font-weight: 600;
}
.mtx-consent__link:hover {
  color: #d4b978;
}
.mtx-consent__link:focus-visible {
  outline: 2px solid #C5A059;
  outline-offset: 2px;
  border-radius: 2px;
}

.mtx-consent__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mtx-consent__btn {
  padding: 0.6rem 1.1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition: filter 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.mtx-consent__btn:focus {
  outline: none;
}
.mtx-consent__btn:focus-visible {
  outline: 2px solid #F5F5F5;
  outline-offset: 2px;
}

.mtx-consent__btn--secondary {
  background: transparent;
  color: #C5A059;
  border: 1px solid #C5A059;
}
.mtx-consent__btn--secondary:hover {
  background: rgba(197, 160, 89, 0.12);
}

.mtx-consent__btn--primary {
  background: linear-gradient(135deg, #C5A059, #a8884a);
  color: #ffffff;
  border: 1px solid rgba(197, 160, 89, 0.5);
  box-shadow: 0 4px 14px rgba(197, 160, 89, 0.25);
}
.mtx-consent__btn--primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 18px rgba(197, 160, 89, 0.35);
}

@media (max-width: 640px) {
  .mtx-consent {
    padding: 0.875rem 1rem;
  }
  .mtx-consent__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .mtx-consent__actions {
    justify-content: stretch;
  }
  .mtx-consent__btn {
    flex: 1 1 auto;
    text-align: center;
  }
}

@media print {
  .mtx-consent { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .mtx-consent__btn {
    transition: none;
  }
}

/* Mentex Pflicht-Einwilligung (Kauf-Checkout)
   --------------------------------------------------------------
   CSP-konformer Ersatz für die ursprünglich inline gestylten
   AGB-/Datenschutz-Checkboxen in templates/index.html und
   templates/buy_credits.html. style-src-attr ist 'none', daher
   greifen inline-style-Attribute nicht — Layout muss über Klassen
   definiert werden. */

.mtx-purchase-consent {
  margin-top: 0;
  margin-bottom: 1rem;
  padding: 1.25rem;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid var(--border-gold, rgba(212, 175, 55, 0.35));
  border-radius: 0.75rem;
}

.mtx-purchase-consent__title {
  margin-top: 0;
}

.mtx-purchase-consent__intro {
  color: var(--muted, #a0a0a0);
  font-size: 0.88rem;
  margin-bottom: 0.85rem;
}

.mtx-purchase-consent__row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.45;
}

.mtx-purchase-consent__row:last-of-type {
  margin-bottom: 0;
}

.mtx-purchase-consent__checkbox {
  margin-top: 0.25rem;
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  cursor: pointer;
}

.mtx-purchase-consent__link {
  color: var(--accent, #C5A059);
  text-decoration: underline;
}

.mtx-purchase-consent__hint {
  display: none;
  color: #fb7185;
  font-size: 0.85rem;
  margin-top: 0.65rem;
  margin-bottom: 0;
}

.mtx-purchase-consent__hint.is-visible {
  display: block;
}
