/* =====================================================
   COOKIE CONSENT BANNER – Blumenhaus Neufahrn
   DSGVO-konform | § 25 TDDDG | DSK-Orientierungshilfe
   ===================================================== */

/* ===== OVERLAY & CONTAINER ===== */
.cc-banner {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.cc-banner.cc-visible {
  opacity: 1;
  visibility: visible;
}

.cc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cc-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  margin: 0 16px 20px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.06);
  animation: ccSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ccSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ===== HEADER ===== */
.cc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 28px 0;
}

.cc-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.cc-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a2e1f;
  margin: 0;
  letter-spacing: -0.01em;
}

.cc-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  color: #1a2e1f;
  transition: background 0.2s, border-color 0.2s;
}

.cc-back:hover {
  background: #f1f0ec;
  border-color: rgba(0, 0, 0, 0.2);
}

/* ===== TEXT ===== */
.cc-text {
  padding: 16px 28px 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #4a5a4f;
  margin: 0;
}

.cc-text-small {
  font-size: 0.82rem;
  padding-top: 12px;
}

.cc-link-row {
  padding: 10px 28px 0;
  font-size: 0.8rem;
  margin: 0;
}

.cc-link {
  color: #3a8a55;
  text-decoration: none;
  font-weight: 500;
}

.cc-link:hover {
  text-decoration: underline;
}

.cc-link-dot {
  color: #ccc;
  margin: 0 6px;
}

/* ===== BUTTONS ===== */
.cc-buttons {
  display: flex;
  gap: 10px;
  padding: 20px 28px 24px;
  flex-wrap: wrap;
}

.cc-btn {
  flex: 1;
  min-width: 140px;
  padding: 13px 20px;
  border: none;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: -0.01em;
  font-family: inherit;
}

/* Alle ablehnen / Nur notwendige – GLEICHWERTIG sichtbar! (DSK-Anforderung) */
.cc-btn-reject {
  background: #f1f0ec;
  color: #1a2e1f;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
}

.cc-btn-reject:hover {
  background: #e4e3dd;
  border-color: rgba(0, 0, 0, 0.18);
}

/* Einstellungen */
.cc-btn-settings {
  background: transparent;
  color: #3a8a55;
  border: 1.5px solid #3a8a55;
}

.cc-btn-settings:hover {
  background: rgba(58, 138, 85, 0.06);
}

/* Alle akzeptieren */
.cc-btn-accept {
  background: linear-gradient(135deg, #3a8a55 0%, #276640 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(58, 138, 85, 0.3);
}

.cc-btn-accept:hover {
  box-shadow: 0 6px 24px rgba(58, 138, 85, 0.4);
  transform: translateY(-1px);
}

/* ===== KATEGORIEN ===== */
.cc-category {
  margin: 0 28px;
  padding: 16px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.cc-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cc-cat-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cc-cat-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a2e1f;
  margin: 0;
}

.cc-cat-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f0ec;
  color: #6a7a6f;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cc-badge-always {
  background: #e8f5ed;
  color: #276640;
}

.cc-cat-desc {
  margin-top: 10px;
}

.cc-cat-desc p {
  font-size: 0.8rem;
  line-height: 1.6;
  color: #6a7a6f;
  margin: 0 0 8px;
}

.cc-cat-note {
  font-style: italic;
  opacity: 0.7;
}

/* ===== TOGGLE SWITCH ===== */
.cc-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-toggle-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  transition: background 0.3s ease;
}

.cc-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.cc-toggle input:checked + .cc-toggle-slider {
  background: #3a8a55;
}

.cc-toggle input:checked + .cc-toggle-slider::before {
  transform: translateX(20px);
}

.cc-toggle-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== DETAIL TABLE ===== */
.cc-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  margin-top: 8px;
}

.cc-detail-table th,
.cc-detail-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  vertical-align: top;
}

.cc-detail-table th {
  font-weight: 600;
  color: #1a2e1f;
  white-space: nowrap;
  width: 110px;
}

.cc-detail-table td {
  color: #6a7a6f;
}

.cc-detail-table code {
  background: #f1f0ec;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.72rem;
}

.cc-detail-table a {
  color: #3a8a55;
  text-decoration: none;
}

.cc-detail-table a:hover {
  text-decoration: underline;
}

/* ===== GOOGLE MAPS PLATZHALTER ===== */
.cc-maps-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f5ed 0%, #f1f0ec 100%);
  border-radius: inherit;
  z-index: 2;
}

.cc-maps-placeholder-inner {
  text-align: center;
  padding: 32px 24px;
  max-width: 380px;
}

.cc-maps-placeholder-inner svg {
  color: #3a8a55;
  margin-bottom: 12px;
  opacity: 0.6;
}

.cc-maps-placeholder-inner p {
  margin: 0 0 12px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #4a5a4f;
}

.cc-maps-placeholder-inner p strong {
  color: #1a2e1f;
  font-size: 0.95rem;
}

.cc-maps-btn {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, #3a8a55, #276640);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.cc-maps-btn:hover {
  box-shadow: 0 4px 16px rgba(58, 138, 85, 0.35);
  transform: translateY(-1px);
}

.cc-maps-link {
  margin-top: 8px !important;
  font-size: 0.75rem !important;
}

.cc-maps-link a {
  color: #3a8a55;
  text-decoration: none;
}

.cc-maps-link a:hover {
  text-decoration: underline;
}

/* ===== FOOTER LINK ===== */
#openCookieSettings {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

#openCookieSettings:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ===== SCROLLBAR DIALOG ===== */
.cc-dialog::-webkit-scrollbar {
  width: 6px;
}

.cc-dialog::-webkit-scrollbar-track {
  background: transparent;
}

.cc-dialog::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .cc-dialog {
    margin: 0 8px 12px;
    max-height: 85vh;
    border-radius: 16px;
  }

  .cc-header {
    padding: 20px 20px 0;
  }

  .cc-text {
    padding: 12px 20px 0;
    font-size: 0.82rem;
  }

  .cc-link-row {
    padding: 8px 20px 0;
  }

  .cc-buttons {
    padding: 16px 20px 20px;
    flex-direction: column;
  }

  .cc-btn {
    min-width: unset;
    width: 100%;
  }

  .cc-category {
    margin: 0 20px;
  }

  .cc-detail-table th {
    width: 80px;
  }
}
