/* =================================================================
   LM Websolution – Cookie Consent Banner
   cookie.css
================================================================= */

/* ── Overlay (für Detail-Modal) ── */
#lm-cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 31, 68, 0.45);
  backdrop-filter: blur(3px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
#lm-cookie-overlay.vis {
  opacity: 1;
  pointer-events: all;
}

/* ── Banner ── */
#lm-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #fff;
  border-top: 1.5px solid rgba(15, 31, 68, 0.1);
  box-shadow: 0 -8px 32px rgba(15, 31, 68, 0.1);
  padding: 1.25rem 1.5rem;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#lm-cookie-banner.vis {
  transform: translateY(0);
}

.lm-cb-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.lm-cb-text {
  flex: 1 1 300px;
}
.lm-cb-text p {
  font-family: 'Archivo', sans-serif;
  font-size: 13.5px;
  color: #0f1f44;
  line-height: 1.55;
  margin: 0;
}
.lm-cb-text a {
  color: #2B6FFF;
  text-decoration: none;
  font-weight: 600;
}
.lm-cb-text a:hover {
  text-decoration: underline;
}

.lm-cb-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.lm-cb-btn {
  font-family: 'Archivo', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  white-space: nowrap;
  line-height: 1;
}
.lm-cb-btn-primary {
  background: #2B6FFF;
  color: #fff;
}
.lm-cb-btn-primary:hover {
  background: #1a5ce8;
  box-shadow: 0 4px 14px rgba(43, 111, 255, 0.35);
}
.lm-cb-btn-secondary {
  background: transparent;
  color: #0f1f44;
  border: 1.5px solid rgba(15, 31, 68, 0.25);
}
.lm-cb-btn-secondary:hover {
  background: #f8fafc;
  border-color: rgba(15, 31, 68, 0.4);
}
.lm-cb-btn-ghost {
  background: transparent;
  color: rgba(15, 31, 68, 0.55);
  font-weight: 600;
  padding: 0.55rem 0.5rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.lm-cb-btn-ghost:hover {
  color: #0f1f44;
}

/* ── Detail Modal ── */
#lm-cookie-modal {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 10000;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 31, 68, 0.18);
  width: min(560px, calc(100vw - 2rem));
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  padding: 1.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
#lm-cookie-modal.vis {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.lm-cm-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.lm-cm-title {
  font-family: 'Space Grotesk', 'Archivo', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f1f44;
  margin: 0;
}
.lm-cm-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: rgba(15, 31, 68, 0.45);
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.lm-cm-close:hover {
  color: #0f1f44;
  background: #f8fafc;
}

.lm-cm-intro {
  font-size: 13px;
  color: rgba(15, 31, 68, 0.65);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}
.lm-cm-intro a {
  color: #2B6FFF;
  text-decoration: none;
  font-weight: 600;
}

/* Consent rows */
.lm-cm-row {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.9rem 0;
  border-top: 1px solid rgba(15, 31, 68, 0.08);
}
.lm-cm-row:last-of-type {
  border-bottom: 1px solid rgba(15, 31, 68, 0.08);
  margin-bottom: 1.25rem;
}
.lm-cm-row-body {
  flex: 1;
}
.lm-cm-row-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f1f44;
  margin-bottom: 0.25rem;
}
.lm-cm-row-desc {
  font-size: 12.5px;
  color: rgba(15, 31, 68, 0.6);
  line-height: 1.5;
}

/* Toggle switch */
.lm-toggle {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  margin-top: 2px;
}
.lm-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.lm-toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(15, 31, 68, 0.15);
  border-radius: 11px;
  transition: background 0.2s;
  cursor: pointer;
}
.lm-toggle input:checked + .lm-toggle-track {
  background: #2B6FFF;
}
.lm-toggle input:disabled + .lm-toggle-track {
  opacity: 0.5;
  cursor: not-allowed;
}
.lm-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.lm-toggle input:checked + .lm-toggle-track::after {
  transform: translateX(18px);
}

/* Modal footer */
.lm-cm-footer {
  display: flex;
  gap: 0.625rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ── Re-open button (rechts unten) ── */
#lm-cookie-reopen {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 9000;
  background: rgba(255,255,255,0.92);
  border: 1.5px solid rgba(15, 31, 68, 0.15);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-family: 'Archivo', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(15, 31, 68, 0.6);
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(15, 31, 68, 0.1);
  transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
  display: none;
}
#lm-cookie-reopen:hover {
  color: #0f1f44;
  border-color: rgba(15, 31, 68, 0.35);
  box-shadow: 0 4px 16px rgba(15, 31, 68, 0.14);
}
#lm-cookie-reopen.vis {
  display: block;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  #lm-cookie-banner {
    padding: 1rem 1rem 1.1rem;
  }

  .lm-cb-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  /* Verhindert dass der Text die gesamte Höhe füllt */
  .lm-cb-text {
    flex: none;
  }

  .lm-cb-text p {
    font-size: 13px;
  }

  /* Buttons untereinander, volle Breite */
  .lm-cb-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  /* "Alle akzeptieren" – groß und prominent */
  #lm-cb-accept {
    order: 1;
    width: 100%;
    padding: 0.72rem 1rem;
    font-size: 14px;
    border-radius: 10px;
  }

  /* "Nur notwendige" – volle Breite darunter */
  #lm-cb-deny {
    order: 2;
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: 13.5px;
    border-radius: 10px;
  }

  /* "Einstellungen" – kleiner Textlink, zentriert */
  #lm-cb-settings {
    order: 3;
    width: 100%;
    text-align: center;
    padding: 0.2rem 0;
    font-size: 12px;
    color: rgba(15, 31, 68, 0.45);
  }

  /* Modal als Bottom-Sheet */
  #lm-cookie-modal {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    transform: translateY(20px);
    border-radius: 16px 16px 0 0;
    padding: 1.4rem 1rem 1.75rem;
  }
  #lm-cookie-modal.vis {
    transform: translateY(0);
  }

  .lm-cm-footer {
    flex-direction: column;
    gap: 0.45rem;
  }
  .lm-cm-footer .lm-cb-btn {
    width: 100%;
    text-align: center;
    padding: 0.72rem 1rem;
    border-radius: 10px;
  }
  #lm-cm-accept-all { order: 1; }
  #lm-cm-save       { order: 2; }

  #lm-cookie-reopen {
    width: 44px;
    height: 44px;
    left: 0.75rem;
    bottom: 0.75rem;
    padding: 0;
    font-size: 0;
    display: none;
    align-items: center;
    justify-content: center;
  }

  #lm-cookie-reopen.vis {
    display: inline-flex;
  }

  #lm-cookie-reopen::before {
    content: "🍪";
    font-size: 17px;
    line-height: 1;
  }
}
