/* ============================================================
   Cookie Consent Modal — A&M GmbH
   ============================================================ */

#cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}
#cc-overlay.visible { opacity: 1; }

#cc-modal {
  background: #ffffff;
  border-radius: 8px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a1a;
  font-size: 14px;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
#cc-overlay.visible #cc-modal { transform: translateY(0); }

/* Header */
.cc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem 1rem;
  border-bottom: 1px solid #e8e8e8;
}
.cc-header-title { font-size: 0.95rem; font-weight: 600; color: #1a1a1a; }
.cc-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #999;
  line-height: 1;
  padding: 2px 4px;
  transition: color 0.2s;
}
.cc-close:hover { color: #1a1a1a; }

/* Tabs */
.cc-tabs {
  display: flex;
  border-bottom: 1px solid #e8e8e8;
  padding: 0 1.4rem;
}
.cc-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.7rem 0;
  margin-right: 1.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  color: #777;
  transition: color 0.2s, border-color 0.2s;
}
.cc-tab.active { color: #0066B3; border-bottom-color: #0066B3; }

/* Body */
.cc-body {
  padding: 1.1rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.cc-tab-content { display: block; }

/* Category Cards */
.cc-card {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}
.cc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: #f8f8f8;
}
.cc-card-left { display: flex; align-items: center; gap: 0.65rem; }
.cc-accordion-btn {
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 0.6rem;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s ease;
  flex-shrink: 0;
  padding: 0;
}
.cc-accordion-btn.open { transform: rotate(180deg); }
.cc-card-info { display: flex; flex-direction: column; gap: 2px; }
.cc-card-name { font-size: 0.88rem; font-weight: 600; color: #1a1a1a; }
.cc-card-always { font-size: 0.72rem; color: #0066B3; font-weight: 500; }

/* Toggle Switch */
.cc-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 23px;
  flex-shrink: 0;
  cursor: pointer;
}
.cc-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.cc-toggle-slider {
  position: absolute;
  inset: 0;
  background: #cccccc;
  border-radius: 23px;
  transition: background 0.22s;
}
.cc-toggle-slider::before {
  content: '';
  position: absolute;
  width: 17px;
  height: 17px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.22s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cc-toggle input:checked + .cc-toggle-slider { background: #0066B3; }
.cc-toggle input:checked + .cc-toggle-slider::before { transform: translateX(19px); }
.cc-toggle-disabled { cursor: not-allowed; }
.cc-toggle-disabled input:checked + .cc-toggle-slider { background: #b0b0b0; }

/* Accordion Content */
.cc-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease, padding 0.28s ease;
  padding: 0 1rem;
  background: #fff;
}
.cc-accordion-content.open { max-height: 200px; padding: 0.7rem 1rem; }
.cc-accordion-content p { margin: 0; font-size: 0.82rem; color: #555; line-height: 1.6; }

/* Services Tab */
.cc-service-list { display: flex; flex-direction: column; }
.cc-service-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #f0f0f0;
}
.cc-service-item:last-child { border-bottom: none; }
.cc-service-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 20px;
  flex-shrink: 0;
}
.cc-badge-essential { background: #e6f4e6; color: #2a7a2a; }
.cc-badge-functional { background: #e3eef9; color: #0055a0; }
.cc-service-name { font-size: 0.85rem; color: #1a1a1a; }

/* Footer Buttons */
.cc-footer {
  display: flex;
  gap: 0.45rem;
  padding: 0.9rem 1.4rem;
  border-top: 1px solid #e8e8e8;
}
.cc-btn {
  flex: 1;
  padding: 0.6rem 0.4rem;
  background: #1a1a1a;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  text-align: center;
  white-space: nowrap;
  font-family: inherit;
}
.cc-btn:hover { opacity: 0.8; }

/* Powered by */
.cc-powered {
  text-align: center;
  font-size: 0.7rem;
  color: #bbb;
  padding: 0.4rem 1.4rem 0.9rem;
}

/* Map Placeholder */
.cc-map-placeholder {
  aspect-ratio: 16/9;
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  text-align: center;
  padding: 2rem;
}
.cc-map-placeholder svg { color: #999; }
.cc-map-placeholder p {
  margin: 0;
  font-size: 0.83rem;
  color: #666;
  max-width: 280px;
  line-height: 1.55;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.cc-map-open-btn {
  padding: 0.5rem 1.1rem;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.cc-map-open-btn:hover { opacity: 0.8; }

/* Cookie-Settings Button (Datenschutz page) */
.cc-settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 1.5rem;
  transition: opacity 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.cc-settings-btn:hover { opacity: 0.8; }

@media (max-width: 520px) {
  .cc-footer { flex-direction: column; }
}
