/**
 * GDPR Cookie Banner Styles
 */

/* Grundstil für den Cookie-Banner */
.gdpr-cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  font-family: sans-serif;
  /* Kein Overlay – der Banner erscheint als kleines, elegantes Element */
}

/* Container: moderner, kompakter Stil */
.gdpr-cookie-banner-container {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 16px;
  margin: 0 auto 16px auto;
  width: 90%;
  max-width: 600px;
}

/* Header */
.gdpr-cookie-banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
  margin-bottom: 8px;
}

.gdpr-cookie-banner-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.gdpr-cookie-banner-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
}

/* Inhalt */
.gdpr-cookie-banner-content {
  font-size: 14px;
  color: #555;
  line-height: 1.4;
  margin-bottom: 12px;
  max-height: 300px;
  overflow: auto;
}

.gdpr-cookie-banner-info p {
  margin: 0 0 8px 0;
}

/* Accordion-Bereich */
.gdpr-cookie-banner-accordion {
  margin-top: 12px;
}

.gdpr-cookie-banner-accordion-item {
  margin-bottom: 8px;
  border: 1px solid #eee;
  border-radius: 4px;
  overflow: hidden;
}

.gdpr-cookie-banner-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f7f7f7;
  padding: 8px 12px;
  cursor: pointer;
}

.gdpr-cookie-banner-accordion-header h3 {
  margin: 0;
  font-size: 15px;
  color: #333;
}

.gdpr-cookie-banner-accordion-toggle {
  font-size: 16px;
  color: #666;
}

.gdpr-cookie-banner-accordion-content {
  display: none;
  padding: 12px;
  background-color: #fff;
}

/* Service-Gruppen */
.gdpr-cookie-banner-service-group {
  margin-bottom: 12px;
}

.gdpr-cookie-banner-service-group-header {
  display: flex;
  align-items: center;
  padding: 4px 0;
}

.gdpr-cookie-banner-service-group-header h4 {
  margin: 0 0 0 8px;
  font-size: 14px;
  color: #333;
}

.gdpr-cookie-banner-service-info-toggle {
  margin-left: auto;
  background: none;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 12px;
  cursor: pointer;
}

.gdpr-cookie-banner-service-group-info {
  display: none;
  padding: 8px 0 8px 20px;
  font-size: 13px;
  color: #555;
}

/* Einzelne Services */
.gdpr-cookie-banner-service {
  margin-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #eee;
}

.gdpr-cookie-banner-service:last-child {
  border-bottom: none;
}

.gdpr-cookie-banner-service-header {
  display: flex;
  align-items: center;
}

.gdpr-cookie-banner-service-header h5 {
  margin: 0 0 0 8px;
  font-size: 14px;
  color: #333;
}

.gdpr-cookie-banner-service-info {
  display: none;
  padding: 8px 0 0 20px;
  font-size: 13px;
  color: #555;
}

/* Warnhinweis */
.gdpr-cookie-banner-warning {
  background-color: #ffecb3;
  color: #8a6d3b;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 11px;
  margin-left: 6px;
}

/* Google Consent Mode */
.gdpr-cookie-banner-gcm-purposes {
  margin-top: 12px;
}

.gdpr-cookie-banner-gcm-purposes h4 {
  font-size: 14px;
  margin-bottom: 8px;
  color: #333;
}

.gdpr-cookie-banner-purpose {
  margin-bottom: 6px;
}

.gdpr-cookie-banner-purpose label {
  font-size: 14px;
  color: #555;
  display: flex;
  align-items: center;
}

.gdpr-cookie-banner-purpose input[type="checkbox"] {
  margin-right: 6px;
}

/* Toggle Switch */
.gdpr-cookie-banner-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 18px;
}

.gdpr-cookie-banner-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.gdpr-cookie-banner-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 18px;
}

.gdpr-cookie-banner-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: #fff;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .gdpr-cookie-banner-slider {
  background-color: var(--primary-color, #0066cc);
}

input:checked + .gdpr-cookie-banner-slider:before {
  transform: translateX(18px);
}

/* Footer */
.gdpr-cookie-banner-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #eee;
  padding-top: 8px;
}

.gdpr-cookie-banner-btn {
  padding: 8px 14px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

.gdpr-cookie-banner-btn-accept-all {
  background-color: var(--primary-color, #0066cc);
  color: #fff;
}

.gdpr-cookie-banner-btn-reject-all {
  background-color: transparent;
  color: #666;
  border: 1px solid #ccc;
}

.gdpr-cookie-banner-btn-save {
  background-color: #fff;
  color: var(--primary-color, #0066cc);
  border: 1px solid var(--primary-color, #0066cc);
}

/* Powered by Hinweis */
.gdpr-cookie-banner-powered-by {
  text-align: center;
  font-size: 11px;
  color: #aaa;
  margin-top: 8px;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
  .gdpr-cookie-banner-container {
    width: 95%;
    padding: 12px;
  }
  .gdpr-cookie-banner-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .gdpr-cookie-banner-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .gdpr-cookie-banner-header h2 {
    font-size: 16px;
  }
  .gdpr-cookie-banner-content {
    font-size: 13px;
  }
}