/* ==========================================================================
   Cookie-Consent-Banner — wunschberuf-pflege.ch
   Passend zum bestehenden Farbschema: klinisches Grün (#0E6B52) +
   elegantes Blau (#2F6FA3) auf Weiss. Schriften: Fredoka (Überschriften),
   Inter (Fliesstext) — mit System-Font-Fallback, falls die Fonts auf der
   Seite noch nicht eingebunden sind.
   ========================================================================== */

:root {
  --wp-cc-green: #0E6B52;
  --wp-cc-green-dark: #0a4f3d;
  --wp-cc-blue: #2F6FA3;
  --wp-cc-text: #1f2d2a;
  --wp-cc-text-muted: #5b6b67;
  --wp-cc-border: #e2e8e6;
  --wp-cc-bg: #ffffff;
  --wp-cc-radius: 14px;
  --wp-cc-shadow: 0 -8px 32px rgba(14, 107, 82, 0.12), 0 -2px 8px rgba(0, 0, 0, 0.06);
  --wp-cc-font-heading: 'Fredoka', 'Segoe UI', system-ui, sans-serif;
  --wp-cc-font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* Overlay (nur sichtbar, wenn das Einstellungen-Panel offen ist) */
.wp-cc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 27, 0.35);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.wp-cc-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Banner-Grundgerüst */
.wp-cc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: var(--wp-cc-bg);
  border-top: 3px solid var(--wp-cc-green);
  box-shadow: var(--wp-cc-shadow);
  font-family: var(--wp-cc-font-body);
  color: var(--wp-cc-text);
  transform: translateY(110%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.wp-cc-banner.is-visible {
  transform: translateY(0);
}

.wp-cc-banner__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.wp-cc-banner__icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(14, 107, 82, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wp-cc-green);
}
.wp-cc-banner__icon svg {
  width: 24px;
  height: 24px;
}

.wp-cc-banner__content {
  flex: 1 1 auto;
  min-width: 0;
}

.wp-cc-banner__title {
  font-family: var(--wp-cc-font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 4px;
  color: var(--wp-cc-text);
}

.wp-cc-banner__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--wp-cc-text-muted);
}

.wp-cc-banner__text a {
  color: var(--wp-cc-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}
.wp-cc-banner__text a:hover {
  color: var(--wp-cc-green-dark);
}

.wp-cc-banner__actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Buttons */
.wp-cc-btn {
  font-family: var(--wp-cc-font-body);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}
.wp-cc-btn:active {
  transform: scale(0.97);
}
.wp-cc-btn:focus-visible {
  outline: 2px solid var(--wp-cc-blue);
  outline-offset: 2px;
}

.wp-cc-btn--ghost {
  background: transparent;
  border-color: var(--wp-cc-border);
  color: var(--wp-cc-text-muted);
}
.wp-cc-btn--ghost:hover {
  border-color: var(--wp-cc-green);
  color: var(--wp-cc-green-dark);
}

.wp-cc-btn--outline {
  background: #ffffff;
  border-color: var(--wp-cc-green);
  color: var(--wp-cc-green);
}
.wp-cc-btn--outline:hover {
  background: rgba(14, 107, 82, 0.06);
}

.wp-cc-btn--primary {
  background: var(--wp-cc-green);
  border-color: var(--wp-cc-green);
  color: #ffffff;
}
.wp-cc-btn--primary:hover {
  background: var(--wp-cc-green-dark);
  border-color: var(--wp-cc-green-dark);
}

/* ==========================================================================
   Einstellungen-Panel (Modal)
   ========================================================================== */

.wp-cc-modal {
  position: fixed;
  z-index: 9999;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%);
  width: min(560px, calc(100vw - 32px));
  max-height: min(640px, calc(100vh - 48px));
  overflow-y: auto;
  background: var(--wp-cc-bg);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(14, 107, 82, 0.22), 0 4px 16px rgba(0, 0, 0, 0.1);
  font-family: var(--wp-cc-font-body);
  color: var(--wp-cc-text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.wp-cc-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.wp-cc-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--wp-cc-border);
}

.wp-cc-modal__title {
  font-family: var(--wp-cc-font-heading);
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0 0 6px;
  color: var(--wp-cc-text);
}

.wp-cc-modal__subtitle {
  margin: 0;
  font-size: 0.88rem;
  color: var(--wp-cc-text-muted);
  line-height: 1.5;
}

.wp-cc-modal__close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--wp-cc-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}
.wp-cc-modal__close:hover {
  background: rgba(14, 107, 82, 0.08);
  color: var(--wp-cc-green-dark);
}

.wp-cc-modal__body {
  padding: 8px 28px 4px;
}

.wp-cc-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--wp-cc-border);
}
.wp-cc-category:last-child {
  border-bottom: none;
}

.wp-cc-category__label {
  font-weight: 600;
  font-size: 0.94rem;
  margin: 0 0 4px;
  color: var(--wp-cc-text);
}

.wp-cc-category__desc {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--wp-cc-text-muted);
}

.wp-cc-category__badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--wp-cc-green);
  background: rgba(14, 107, 82, 0.1);
  border-radius: 999px;
  padding: 2px 9px;
  vertical-align: middle;
}

/* Toggle-Switch */
.wp-cc-switch {
  flex: 0 0 auto;
  position: relative;
  width: 44px;
  height: 26px;
}
.wp-cc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.wp-cc-switch__track {
  position: absolute;
  inset: 0;
  background: #d7ded9;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.wp-cc-switch__track::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}
.wp-cc-switch input:checked + .wp-cc-switch__track {
  background: var(--wp-cc-green);
}
.wp-cc-switch input:checked + .wp-cc-switch__track::before {
  transform: translateX(18px);
}
.wp-cc-switch input:disabled + .wp-cc-switch__track {
  opacity: 0.6;
  cursor: not-allowed;
}
.wp-cc-switch input:focus-visible + .wp-cc-switch__track {
  outline: 2px solid var(--wp-cc-blue);
  outline-offset: 2px;
}

.wp-cc-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 18px 28px 26px;
}

/* Kleiner, dezenter Wiedereinstiegs-Button (falls Nutzer den Banner schon
   bestätigt hat und die Einstellungen später wieder öffnen möchte) */
.wp-cc-reopen {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 9997;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--wp-cc-border);
  background: #ffffff;
  color: var(--wp-cc-green);
  box-shadow: 0 4px 16px rgba(14, 107, 82, 0.16);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.wp-cc-reopen.is-visible {
  display: flex;
}
.wp-cc-reopen:hover {
  transform: translateY(-2px);
  border-color: var(--wp-cc-green);
}
.wp-cc-reopen svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 860px) {
  .wp-cc-banner__inner {
    flex-wrap: wrap;
    padding: 20px 20px;
  }
  .wp-cc-banner__actions {
    width: 100%;
    justify-content: stretch;
  }
  .wp-cc-banner__actions .wp-cc-btn {
    flex: 1 1 auto;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .wp-cc-banner__icon {
    display: none;
  }
  .wp-cc-modal {
    width: calc(100vw - 20px);
  }
  .wp-cc-modal__header,
  .wp-cc-modal__body,
  .wp-cc-modal__footer {
    padding-left: 20px;
    padding-right: 20px;
  }
}
