/* ==========================================================================
   Consent banner
   ========================================================================== */

.mc-consent {
  position: fixed;
  inset: 0;
  z-index: 999998;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  padding: 24px;

  background: transparent;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 180ms ease,
    visibility 180ms ease;
}

.mc-consent.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}


/* ==========================================================================
   Page state
   ========================================================================== */

html.mc-consent-is-open,
html.mc-consent-is-open body {
  overflow: auto;
}


/* ==========================================================================
   Consent box
   ========================================================================== */

.mc-consent__box {
  width: min(1120px, 100%);
  max-height: calc(100vh - 48px);
  pointer-events: auto;

  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;

  padding: 28px 30px;

  overflow-y: auto;
  overscroll-behavior: contain;

  color: #111827;
  background: #ffffff;

  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 18px;

  box-shadow:
    0 24px 70px rgba(15, 23, 42, 0.24),
    0 8px 24px rgba(15, 23, 42, 0.12);

  transform: translateY(18px);

  transition: transform 180ms ease;
}

.mc-consent.is-visible .mc-consent__box {
  transform: translateY(0);
}


/* ==========================================================================
   Content
   ========================================================================== */

.mc-consent__content {
  min-width: 0;
}

.mc-consent__title {
  margin: 0 0 10px;

  color: #111827;

  font-family: inherit;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
}

.mc-consent__description {
  max-width: 760px;
  margin: 0;

  color: #4b5563;

  font-family: inherit;
  font-size: 0.96rem;
  line-height: 1.6;
}

.mc-consent__privacy-link {
  display: inline-block;
  margin-top: 12px;

  color: #166534;

  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.mc-consent__privacy-link:hover {
  color: #14532d;
}

.mc-consent__status {
  display: block;
  width: fit-content;

  margin: 14px 0 0;
  padding: 7px 10px;

  color: #374151;
  background: #f3f4f6;

  border-radius: 8px;

  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
}


/* ==========================================================================
   Actions
   ========================================================================== */

.mc-consent__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.mc-consent__button {
  appearance: none;

  min-height: 46px;
  padding: 11px 18px;

  border: 1px solid transparent;
  border-radius: 10px;

  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;

  cursor: pointer;

  transition:
    color 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.mc-consent__button:hover {
  transform: translateY(-1px);
}

.mc-consent__button:active {
  transform: translateY(0);
}

.mc-consent__button:focus-visible,
.mc-consent__privacy-link:focus-visible {
  outline: 3px solid rgba(34, 197, 94, 0.35);
  outline-offset: 3px;
}


/* Primary: Statistik akzeptieren */

.mc-consent__button--primary {
  color: #ffffff;
  background: #15803d;
  border-color: #15803d;

  box-shadow: 0 7px 18px rgba(21, 128, 61, 0.2);
}

.mc-consent__button--primary:hover {
  background: #166534;
  border-color: #166534;
}


/* Secondary: Nur notwendige */

.mc-consent__button--secondary {
  color: #111827;
  background: #ffffff;
  border-color: #9ca3af;
}

.mc-consent__button--secondary:hover {
  color: #111827;
  background: #f3f4f6;
  border-color: #6b7280;
}


/* Text button: Schließen */

.mc-consent__button--text {
  min-height: 40px;
  padding-inline: 10px;

  color: #4b5563;
  background: transparent;
  border-color: transparent;

  font-weight: 600;
}

.mc-consent__button--text:hover {
  color: #111827;
  background: #f3f4f6;
}


/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 900px) {
  .mc-consent {
    padding: 16px;
  }

  .mc-consent__box {
    max-height: calc(100vh - 32px);

    grid-template-columns: 1fr;
    gap: 22px;

    padding: 24px;
  }

  .mc-consent__actions {
    justify-content: stretch;
  }

  .mc-consent__button--primary,
  .mc-consent__button--secondary {
    flex: 1 1 220px;
  }
}


/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 640px) {
  .mc-consent {
    align-items: flex-end;
    padding: 8px;
  }

  .mc-consent__box {
    width: 100%;
    max-height: calc(100dvh - 16px);

    gap: 18px;

    padding: 22px 18px 18px;

    border-radius: 16px;
  }

  .mc-consent__title {
    margin-bottom: 8px;
    font-size: 1.2rem;
  }

  .mc-consent__description {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .mc-consent__privacy-link {
    margin-top: 10px;
    font-size: 0.86rem;
  }

  .mc-consent__status {
    margin-top: 12px;
    font-size: 0.78rem;
  }

  .mc-consent__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .mc-consent__button {
    width: 100%;
    min-height: 48px;
    white-space: normal;
  }

  .mc-consent__button--text {
    min-height: 42px;
  }
}


/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .mc-consent,
  .mc-consent__box,
  .mc-consent__button {
    transition: none;
  }

  .mc-consent__button:hover,
  .mc-consent__button:active,
  .mc-consent__box {
    transform: none;
  }
}