/* ==========================================================================
   COOKIES – Manger Transporte
   Einheitliches Design für Banner, Einstellungen und Google-Maps-Platzhalter
   ========================================================================== */

/* ==========================================================================
   COOKIE BANNER
   ========================================================================== */

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 9999;

  width: min(calc(100% - 32px), 470px);
  padding: 22px;

  transform: translateX(-50%) translateY(26px);

  background: rgba(15, 23, 34, 0.97);
  color: #ffffff;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;

  box-shadow: 0 18px 48px rgba(8, 20, 34, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

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

  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    visibility 0.28s ease;
}

.cookie-banner.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.cookie-inner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.93rem;
  line-height: 1.65;
}

.cookie-inner a {
  color: #b8d6f4;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-inner a:hover {
  color: #ffffff;
}

/* ===== Banner Buttons ===== */
.cookie-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.cookie-buttons button {
  min-height: 46px;
  padding: 0 18px;

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

  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* Primär: Alle akzeptieren */
#cookie-accept {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #ffffff;
}

#cookie-accept:hover {
  background: var(--clr-accent-dark);
  border-color: var(--clr-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.18);
}

/* Sekundär: Nur notwendige */
#cookie-decline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.88);
}

#cookie-decline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}


/* ==========================================================================
   COOKIE-EINSTELLUNGEN MODAL
   ========================================================================== */

.cookie-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: none;
  padding: 24px;

  align-items: center;
  justify-content: center;
}

.cookie-settings-modal.show {
  display: flex;
}

.cookie-settings-backdrop {
  position: absolute;
  inset: 0;

  background: rgba(6, 15, 25, 0.58);

  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cookie-settings-box {
  position: relative;
  z-index: 1;

  width: min(100%, 520px);
  padding: 30px;

  background: #ffffff;
  color: #17202a;

  border: 1px solid #e3e8ee;
  border-radius: 12px;

  box-shadow: 0 24px 70px rgba(8, 20, 34, 0.24);
}

.cookie-settings-box h3 {
  margin: 0 42px 10px 0;

  color: #17202a;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.25;
}

.cookie-settings-box p {
  margin: 0 0 16px;

  color: #4c5662;
  font-size: 0.94rem;
  line-height: 1.65;
}

.cookie-settings-more {
  margin-top: -4px !important;
  margin-bottom: 18px !important;
}

.cookie-settings-more a {
  color: var(--clr-accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-settings-more a:hover {
  color: var(--clr-accent-dark);
  text-decoration: none;
}

/* ===== Aktueller Status ===== */
.cookie-settings-status {
  margin: 0 0 22px;
  padding: 12px 14px;

  background: #f3f6fa;

  border: 1px solid #e1e7ee;
  border-radius: 7px;

  color: #34404c;
  font-size: 0.89rem;
  line-height: 1.5;
}

/* ===== Schließen ===== */
.cookie-settings-close {
  position: absolute;
  top: 18px;
  right: 18px;

  width: 36px;
  height: 36px;

  display: grid;
  place-items: center;

  padding: 0;

  background: #f3f6fa;
  color: #56616c;

  border: 1px solid #e1e7ee;
  border-radius: 50%;

  font: inherit;
  font-size: 1.25rem;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.cookie-settings-close:hover {
  background: #e9eef4;
  border-color: #d9e0e8;
  color: #17202a;
}

/* ===== Modal Buttons ===== */
.cookie-settings-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-settings-actions button {
  min-height: 46px;
  padding: 0 18px;

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

  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* Primär */
#cookie-settings-accept {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #ffffff;
}

#cookie-settings-accept:hover {
  background: var(--clr-accent-dark);
  border-color: var(--clr-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(40, 116, 178, 0.18);
}

/* Sekundär */
#cookie-settings-decline {
  background: #ffffff;
  border-color: #d5dde6;
  color: #34404c;
}

#cookie-settings-decline:hover {
  background: #f3f6fa;
  border-color: #c7d1dc;
  color: #17202a;
}


/* ==========================================================================
   GOOGLE MAPS PLATZHALTER
   ========================================================================== */

/*
   Keine Änderung am HTML/JS nötig.
   Der vorhandene Button #accept-cookies-map wird nur optisch angepasst.
*/

#map-placeholder .map-inner {
  display: flex;
  min-height: 100%;
  padding: 32px;

  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;

  text-align: center;
}

#map-placeholder .map-inner p {
  margin: 0;

  color: #343a40;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.6;
}

#accept-cookies-map {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 50px;
  padding: 0 22px;

  background: var(--clr-accent);
  color: #ffffff;

  border: 1px solid var(--clr-accent);
  border-radius: 5px;

  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;

  cursor: pointer;

  box-shadow: 0 7px 18px rgba(40, 116, 178, 0.17);

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

#accept-cookies-map:hover {
  background: var(--clr-accent-dark);
  border-color: var(--clr-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(40, 116, 178, 0.23);
}


/* ==========================================================================
   FOKUS / BODY
   ========================================================================== */

body.cookie-modal-open {
  overflow: hidden;
}

.cookie-banner button:focus-visible,
.cookie-banner a:focus-visible,
.cookie-settings-modal button:focus-visible,
.cookie-settings-modal a:focus-visible,
#accept-cookies-map:focus-visible {
  outline: 3px solid rgba(63, 115, 173, 0.28);
  outline-offset: 3px;
}


/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 600px) {
  .cookie-banner {
    bottom: 12px;
    width: calc(100% - 24px);
    padding: 18px;
  }

  .cookie-buttons {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .cookie-buttons button {
    width: 100%;
  }

  .cookie-settings-modal {
    padding: 14px;
  }

  .cookie-settings-box {
    padding: 24px 20px 20px;
  }

  .cookie-settings-box h3 {
    font-size: 1.28rem;
  }

  .cookie-settings-actions {
    flex-direction: column-reverse;
  }

  .cookie-settings-actions button {
    width: 100%;
  }

  #map-placeholder .map-inner {
    padding: 24px 18px;
    gap: 16px;
  }

  #accept-cookies-map {
    width: 100%;
    max-width: 320px;
  }
}


/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .cookie-banner,
  .cookie-buttons button,
  .cookie-settings-close,
  .cookie-settings-actions button,
  #accept-cookies-map {
    transition: none !important;
  }
}
