/* Cookie Consent Manager – lokale Styles, keine externen Ressourcen */
.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(0, 0, 0, 0.58);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.consent-overlay[hidden] {
  display: none !important;
}

.consent-panel {
  width: min(100%, 590px);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  margin: 0 auto;
  padding: clamp(18px, 2.5vw, 24px);
  color: #202522;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 17px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  animation: consent-panel-enter 240ms ease-out both;
}

.consent-kicker {
  margin: 0 0 5px;
  color: #24833a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.consent-panel h2 {
  margin: 0 0 7px;
  color: #202522;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  line-height: 1.25;
}

.consent-description {
  margin: 0 0 14px;
  color: #59625c;
  font-size: 0.9rem;
  line-height: 1.5;
}

.consent-options {
  display: grid;
  gap: 7px;
  margin: 0 0 16px;
}

.consent-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
  padding: 10px 12px;
  background: #f8faf8;
  border: 1px solid #e7ebe8;
  border-radius: 12px;
  cursor: pointer;
}

.consent-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #24833a;
  cursor: pointer;
}

.consent-option input[disabled] {
  cursor: not-allowed;
}

.consent-option-copy {
  display: block;
  min-width: 0;
}

.consent-option-copy strong {
  display: block;
  margin: 0 0 2px;
  color: #202522;
  font-size: 0.92rem;
}

.consent-option-copy small {
  display: block;
  color: #68706b;
  font-size: 0.81rem;
  line-height: 1.4;
}

.consent-status {
  align-self: center;
  color: #68706b;
  font-size: 0.75rem;
  white-space: nowrap;
}

.consent-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.consent-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  color: #202522;
  background: #fff;
  border: 1px solid #cfd8d0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.consent-button:hover {
  background: #f0f7f1;
  border-color: #24833a;
}

.consent-button:active {
  transform: translateY(1px);
}

.consent-button:focus-visible,
.consent-option input:focus-visible,
.calendar-consent-button:focus-visible {
  outline: 3px solid rgba(36, 131, 58, 0.35);
  outline-offset: 3px;
}

.consent-button--accept {
  color: #fff;
  background: #24833a;
  border-color: #24833a;
}

.consent-button--accept:hover {
  color: #fff;
  background: #196d2e;
  border-color: #196d2e;
}

.consent-footnote {
  margin: 11px 0 0;
  color: #68706b;
  font-size: 0.74rem;
  line-height: 1.4;
}

body.consent-manager-open {
  overflow: hidden;
}

/* Platzhalter, wenn der Google Kalender noch nicht freigegeben wurde */
.calendar-consent-placeholder {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 44px);
  color: #202522;
  background: #f8faf8;
  border: 1px solid #e7ebe8;
  border-radius: 18px;
  text-align: center;
}

.calendar-consent-placeholder[hidden] {
  display: none !important;
}

.calendar-consent-placeholder h3 {
  margin: 0 0 10px;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  line-height: 1.35;
}

.calendar-consent-placeholder p {
  max-width: 620px;
  margin: 0 0 20px;
  color: #68706b;
  font-size: 0.94rem;
  line-height: 1.7;
}

.calendar-consent-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  color: #fff;
  background: #24833a;
  border: 1px solid #24833a;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.calendar-consent-button:hover {
  background: #196d2e;
  transform: translateY(-1px);
}

#google-calendar-iframe[hidden] {
  display: none !important;
}

@keyframes consent-panel-enter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 620px) {
  .consent-overlay {
    padding: 12px;
  }

  .consent-panel {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 15px;
    padding: 17px;
  }

  .consent-option {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .consent-status {
    grid-column: 2;
    margin-top: -3px;
  }

  .consent-actions {
    grid-template-columns: 1fr;
  }

  .consent-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent-panel,
  .consent-button,
  .calendar-consent-button {
    animation: none !important;
    transition: none !important;
  }
}
