/* ConsultD Cookie Consent */
#cd-consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#cd-consent-banner {
  background: #fff;
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
  animation: cd-slide-up 0.3s ease-out;
}

@keyframes cd-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cd-consent-inner {
  padding: 24px 28px;
}

#cd-consent-banner h2 {
  font-size: 18px;
  margin: 0 0 10px 0;
  color: #1a1a1a;
  font-weight: 600;
}

#cd-consent-banner p {
  font-size: 14px;
  line-height: 1.5;
  color: #444;
  margin: 0 0 16px 0;
}

/* Buttons */
.cd-consent-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cd-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
  flex: 1;
  min-width: 120px;
}

.cd-btn:active { transform: scale(0.97); }

.cd-btn-primary {
  background: #2563eb;
  color: #fff;
}
.cd-btn-primary:hover { background: #1d4ed8; }

.cd-btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.cd-btn-secondary:hover { background: #e2e8f0; }

/* WICHTIG: Ablehnen und Akzeptieren gleich groß (TTDSG/BGH) */
#cd-btn-reject, #cd-btn-accept {
  font-size: 14px;
  font-weight: 500;
}

/* Details */
.cd-hidden { display: none !important; }

#cd-consent-details {
  margin: 16px 0;
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}

#cd-consent-details-actions {
  margin-top: 12px;
}

.cd-category {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}
.cd-category:last-child { border-bottom: none; }

.cd-category-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.cd-category-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
}

.cd-essential {
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
}

.cd-category-desc {
  font-size: 13px;
  color: #64748b;
  margin: 4px 0 8px 26px;
  line-height: 1.4;
}

/* Cookie Table */
.cd-cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 6px 0 0 26px;
  max-width: calc(100% - 26px);
}

.cd-cookie-table th {
  background: #f8fafc;
  text-align: left;
  padding: 4px 8px;
  font-weight: 600;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

.cd-cookie-table td {
  padding: 4px 8px;
  border-bottom: 1px solid #f1f5f9;
  color: #64748b;
}

/* Footer */
.cd-consent-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  text-align: center;
}

.cd-consent-footer a {
  color: #2563eb;
  text-decoration: none;
}
.cd-consent-footer a:hover { text-decoration: underline; }

/* Revoke Button */
#cd-consent-revoke {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 999998;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  padding: 0;
  overflow: hidden;
}
#cd-consent-revoke img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
#cd-consent-revoke:hover { transform: scale(1.1); }

/* Mobile */
@media (max-width: 600px) {
  .cd-consent-inner { padding: 16px; }
  #cd-consent-banner h2 { font-size: 16px; }
  .cd-consent-actions { flex-direction: column; }
  .cd-btn { width: 100%; text-align: center; }
  .cd-cookie-table { font-size: 11px; }
  .cd-cookie-table, .cd-category-desc { margin-left: 0; max-width: 100%; }
}
