/* Cookie-/Privatsphäre-Banner – angelehnt an Real Cookie Banner (Original) */

.ai-consent-root {
  --ai-consent-bg: #3b3a39;
  --ai-consent-text: #b4b0ac;
  --ai-consent-accent: #d2d2d2;
  --ai-consent-btn-bg: #3b3a39;
  --ai-consent-btn-border: #d2d2d2;
  --ai-consent-essential-bg: #efefef;
  --ai-consent-essential-text: #0a0a0a;
  font-family: Arial, Helvetica, sans-serif;
}

.ai-consent-root *,
.ai-consent-root *::before,
.ai-consent-root *::after {
  box-sizing: border-box;
}

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

.ai-consent-banner {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 9000;
  width: min(1024px, calc(100% - 24px));
  margin-bottom: 16px;
  border-radius: 28px;
  background: var(--ai-consent-bg);
  color: var(--ai-consent-text);
  box-shadow: 0 0 17px rgba(221, 221, 221, 0.2);
}

.ai-consent-banner-inner {
  padding: 20px 24px 22px;
}

.ai-consent-banner h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 400;
  color: var(--ai-consent-text);
}

.ai-consent-banner p {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.45;
}

.ai-consent-banner a {
  color: var(--ai-consent-text);
  text-decoration: underline;
}

.ai-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ai-consent-btn {
  appearance: none;
  border: 1px solid var(--ai-consent-btn-border);
  border-radius: 0;
  background: var(--ai-consent-btn-bg);
  color: var(--ai-consent-accent);
  padding: 8px 16px;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.ai-consent-btn:hover {
  background: #ededed;
  color: #000;
  border-color: #000;
}

.ai-consent-btn--essential {
  background: var(--ai-consent-essential-bg);
  color: var(--ai-consent-essential-text);
  border-color: transparent;
}

.ai-consent-btn--essential:hover {
  background: #e8e8e8;
  color: #000;
}

.ai-consent-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ai-consent-text);
  padding: 5px;
  font-size: 16px;
  text-decoration: underline;
  cursor: pointer;
}

.ai-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 8999;
  background: rgba(0, 0, 0, 0.45);
}

.ai-consent-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9001;
  width: min(530px, calc(100% - 24px));
  max-height: min(740px, calc(100vh - 32px));
  overflow: auto;
  border-radius: 3px;
  background: var(--ai-consent-bg);
  color: var(--ai-consent-text);
  box-shadow: 0 0 17px rgba(221, 221, 221, 0.2);
}

.ai-consent-dialog-header {
  padding: 17px 20px 15px;
  border-bottom: 1px solid var(--ai-consent-text);
}

.ai-consent-dialog-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
}

.ai-consent-dialog-body {
  padding: 15px 20px;
}

.ai-consent-dialog-body > p {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.45;
}

.ai-consent-group {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #efefef;
  border-radius: 5px;
  background: #f4f4f4;
}

.ai-consent-group h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 400;
  color: #d2d2d2;
}

.ai-consent-group p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.35;
  color: #d2d2d2;
}

.ai-consent-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #d2d2d2;
}

.ai-consent-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #3b3a39;
}

.ai-consent-dialog-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 20px 20px;
}

.ai-consent-history-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-consent-history-list li {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(180, 176, 172, 0.35);
  font-size: 13px;
  line-height: 1.45;
}

.ai-consent-history-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.ai-consent-history-empty {
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .ai-consent-banner {
    width: calc(100% - 16px);
    margin-bottom: 8px;
    border-radius: 18px;
  }

  .ai-consent-banner-inner {
    padding: 16px 16px 18px;
  }

  .ai-consent-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ai-consent-btn,
  .ai-consent-link {
    width: 100%;
    text-align: center;
  }
}
