/* Cookie Consent Banner */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  font-family: inherit;
}

.consent-bar {
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 48px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.consent-text {
  flex: 1;
  min-width: 0;
}

.consent-title {
  color: #f5f0e8;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
}

.consent-desc {
  color: #a09a8c;
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

.consent-desc a {
  color: #c8a97e;
  text-decoration: underline;
}

.consent-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.consent-btn {
  font-size: 15px;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: opacity 0.2s;
}

.consent-btn:hover {
  opacity: 0.85;
}

.consent-btn-accept {
  background: #c8a97e;
  color: #1a1a1a;
}

.consent-btn-deny {
  background: #c8a97e;
  color: #1a1a1a;
}

.consent-btn-settings {
  background: transparent;
  color: #a09a8c;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Anpassen-Panel (zweite Ebene) */
.consent-details {
  background: rgba(20, 20, 20, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 24px 16px;
}

.consent-details-inner {
  max-width: 680px;
}

.consent-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.consent-category:last-of-type {
  border-bottom: none;
}

.consent-category-info {
  flex: 1;
  min-width: 0;
  padding-right: 16px;
}

.consent-category-name {
  display: block;
  color: #f5f0e8;
  font-size: 13px;
  font-weight: 500;
}

.consent-category-desc {
  display: block;
  color: #a09a8c;
  font-size: 11px;
  line-height: 1.4;
  margin-top: 2px;
}

/* Toggle Switch */
.consent-toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}

.consent-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.consent-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  transition: background 0.2s;
}

.consent-toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.consent-toggle input:checked + .consent-toggle-slider {
  background: #c8a97e;
}

.consent-toggle input:checked + .consent-toggle-slider::before {
  transform: translateX(16px);
}

.consent-toggle-disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.consent-details-buttons {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* Floating buttons über Banner heben */
body.consent-visible .floating-wa {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 190px);
  transition: bottom 0.3s ease;
}
body.consent-visible .floating-top {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 250px);
  transition: bottom 0.3s ease;
}

/* Mobile */
@media (max-width: 640px) {
  .consent-bar {
    flex-direction: column;
    padding: 16px;
    gap: 12px;
    align-items: stretch;
  }

  .consent-text {
    text-align: center;
  }

  .consent-buttons {
    justify-content: stretch;
  }

  .consent-btn {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
  }

  .consent-details-buttons {
    flex-direction: column;
  }

  .consent-details-buttons .consent-btn {
    width: 100%;
    text-align: center;
  }

  body.consent-visible .floating-wa {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 230px);
  }
  body.consent-visible .floating-top {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 290px);
  }
}
