:root{
  --rot:rgba(178, 0, 33, 1);
  --dunkelgrau: #232323;
  --hellgrau: rgba(135, 135, 145, 1);
  --mittelgrau: rgba(185, 185, 195,1);
  --verlauf_n_unten:  linear-gradient(to bottom, rgba(175, 175, 185, 1), rgba(135, 135, 145, 1));
  --verlauf_n_oben:  linear-gradient(to bottom, rgba(135, 135, 145, 1), rgba(175, 175, 185, 1));
  --schwarz: rgba(0, 0, 0, 1);
  --weiss: rgba(255, 255, 255, 1);
  --strich: border: 3px solid var(--rot);
  font-size: 16px;
}

/**
 * Cookie Banner Styles - EU-konform
 * BRUMMER Elektrotechnik
 */

/* Cookie Banner Container */
#cookie-banner {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transition: bottom 0.4s ease-in-out;
  border-top: 3px solid var(--hellgrau);
}

#cookie-banner.show {
  bottom: 0;
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.cookie-banner-text {
  margin-bottom: 1.5rem;
}

.cookie-banner-text h3 {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  color: var(--rot);
  font-weight: 600;
}

.cookie-banner-text p {
  margin: 0 0 0.5rem 0;
  color: #666;
  line-height: 1.6;
  font-size: 0.95rem;
}

.cookie-banner-text a {
  color: var(--rot);
  text-decoration: none;
  font-weight: 500;
}

.cookie-banner-text a:hover {
  text-decoration: underline;
}

/* Cookie Banner Buttons */
.cookie-banner-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.cookie-btn-primary {
  background: var(--rot);
  color: white;
}

.cookie-btn-primary:hover {
  background:var(--rot);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.cookie-btn-secondary {
  background: #6c757d;
  color: white;
}

.cookie-btn-secondary:hover {
  background: #545b62;
}

.cookie-btn-outline {
  background: transparent;
  color: var(--rot);
  border: 2px solid var(--rot);
}

.cookie-btn-outline:hover {
  background: var(--rot);
  color: white;
}

/* Cookie Settings Modal */
#cookie-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

#cookie-settings-modal.show {
  display: flex;
}

.cookie-modal-content {
  background: white;
  border-radius: 8px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  margin: auto;
}

.cookie-modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}

.cookie-modal-header h2 {
  margin: 0;
  font-size: 1.75rem;
  color: #333;
}

.cookie-close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.cookie-close-btn:hover {
  background: #f0f0f0;
  color: #333;
}

.cookie-modal-body {
  padding: 2rem;
}

.cookie-intro {
  margin-bottom: 2rem;
  color: #666;
  line-height: 1.6;
}

/* Cookie Category */
.cookie-category {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #f8f9fa;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.cookie-category h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #333;
}

.cookie-category p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 28px;
}

.cookie-toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background-color: var(--rot);
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
  transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-required-badge {
  display: inline-block;
  background: var(--rot);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

/* Modal Footer */
.cookie-modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid #e0e0e0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  background: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cookie-banner-content {
    padding: 1.5rem 1rem;
  }

  .cookie-banner-text h3 {
    font-size: 1.25rem;
  }

  .cookie-banner-buttons {
    flex-direction: column;
  }

  .cookie-btn {
    width: 100%;
    text-align: center;
  }

  .cookie-modal-content {
    margin: 0;
    border-radius: 0;
    max-height: 100vh;
    height: 100%;
  }

  .cookie-modal-header,
  .cookie-modal-body,
  .cookie-modal-footer {
    padding: 1rem;
  }

  .cookie-modal-header h2 {
    font-size: 1.5rem;
  }

  .cookie-category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .cookie-modal-footer {
    flex-direction: column;
  }

  .cookie-modal-footer .cookie-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .cookie-banner-text h3 {
    font-size: 1.1rem;
  }

  .cookie-banner-text p {
    font-size: 0.9rem;
  }

  .cookie-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

/* Smooth Scrolling für Modal */
.cookie-modal-content {
  scroll-behavior: smooth;
}

/* Focus Styles für Accessibility */
.cookie-btn:focus,
.cookie-toggle input:focus + .cookie-toggle-slider,
.cookie-close-btn:focus {
  outline: 2px solid var(--rot);
  outline-offset: 2px;
}

/* Animation für Modal */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#cookie-settings-modal.show .cookie-modal-content {
  animation: slideDown 0.3s ease;
}
