/* =========================================================================
   Consent Manager – Styling im Augenarzt-Berlin-Look (Teal/Mint/Sage)
   ========================================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

body.consent-open { overflow: hidden; }

.consent-layer { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: end center;
  padding: var(--space-4); background: rgba(16, 63, 62, .45); backdrop-filter: blur(3px); }
@media (min-width: 640px) { .consent-layer { place-items: center; } }

.consent-card { width: 100%; max-width: 560px; background: var(--color-surface); color: var(--color-text);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--space-6);
  position: relative; max-height: 92vh; overflow-y: auto; }
.consent-card h2 { font-size: var(--fs-xl); margin-bottom: var(--space-3); }
.consent-card p { font-size: var(--fs-sm); color: var(--color-text-soft); }

.consent-close { position: absolute; top: var(--space-3); right: var(--space-3); width: 36px; height: 36px;
  border: 0; background: var(--color-bg-alt); border-radius: var(--radius-full); font-size: 1.4rem; line-height: 1;
  color: var(--color-muted); cursor: pointer; }
.consent-close:hover { background: var(--color-primary-light); color: var(--color-primary); }

.consent-brand-row { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
.consent-brand-row img { height: 26px; width: auto; }

.consent-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: var(--fs-xs); font-weight: 700;
  color: var(--color-primary); margin-bottom: var(--space-2) !important; }

.consent-primary-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-5); }
.consent-button { flex: 1 1 auto; padding: 0.9em 1.4em; border-radius: var(--radius-sm); font-weight: 700;
  font-size: var(--fs-sm); border: 1.5px solid transparent; cursor: pointer; transition: var(--transition); }
.consent-button-primary { background: var(--color-primary); color: #fff; }
.consent-button-primary:hover { background: var(--color-primary-dark); }
.consent-button-secondary { background: transparent; color: var(--color-primary); border-color: var(--color-border); }
.consent-button-secondary:hover { border-color: var(--color-primary); background: var(--color-primary-light); }
.consent-button-quiet { background: transparent; color: var(--color-muted); }
.consent-button-quiet:hover { color: var(--color-primary); }

.consent-settings-link { display: inline-block; margin-top: var(--space-4); background: none; border: 0;
  color: var(--color-primary); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; text-decoration: underline; }

.consent-services { display: grid; gap: var(--space-3); margin: var(--space-5) 0; }
.consent-service { border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.consent-service summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); padding: var(--space-3) var(--space-4); }
.consent-service summary::-webkit-details-marker { display: none; }
.consent-service summary strong { display: block; font-size: var(--fs-sm); }
.consent-service summary small { color: var(--color-muted); font-size: var(--fs-xs); }
.consent-service > p { padding: 0 var(--space-4) var(--space-4); font-size: var(--fs-xs); }
.consent-fixed { font-size: var(--fs-xs); font-weight: 700; color: var(--color-success); white-space: nowrap; }

/* Toggle-Switch */
.consent-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; flex: none; }
.consent-switch input { position: absolute; opacity: 0; width: 44px; height: 24px; margin: 0; cursor: pointer; }
.consent-switch span { width: 44px; height: 24px; border-radius: var(--radius-full); background: var(--color-border);
  transition: var(--transition); position: relative; display: block; }
.consent-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: var(--transition); box-shadow: var(--shadow-sm); }
.consent-switch input:checked + span { background: var(--color-primary); }
.consent-switch input:checked + span::after { transform: translateX(20px); }
.consent-switch input:focus-visible + span { outline: 3px solid var(--color-accent); outline-offset: 2px; }

.consent-settings-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.consent-legal-links { display: flex; gap: var(--space-4); margin-top: var(--space-5); padding-top: var(--space-4);
  border-top: 1px solid var(--color-border); font-size: var(--fs-xs); }
.consent-legal-links a { color: var(--color-muted); }
.consent-legal-links a:hover { color: var(--color-primary); }

/* Schwebender Button zum erneuten Öffnen */
.cookie-settings-fab { position: fixed; left: 18px; bottom: 18px; z-index: 900; width: 48px; height: 48px;
  border-radius: var(--radius-full); background: var(--color-surface); border: 1px solid var(--color-border);
  color: var(--color-primary); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); transition: var(--transition); }
.cookie-settings-fab:hover { background: var(--color-primary-light); border-color: var(--color-accent); }
.cookie-settings-fab svg { width: 24px; height: 24px; }
@media print { .consent-layer, .cookie-settings-fab { display: none !important; } }
