/* ==========================================================================
   Cookie Consent Banner — DSGVO-konform
   ========================================================================== */

.cc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding: 0 var(--space-md, 1.5rem) var(--space-md, 1.5rem);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.cc-banner--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cc-banner--closing {
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
}

.cc-banner__inner {
  max-width: 920px;
  margin: 0 auto;
  background: #0C1B33;
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  box-shadow:
    0 -4px 40px rgba(0, 0, 0, 0.25),
    0 0 80px rgba(59, 130, 246, 0.06);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body, 'Outfit', system-ui, sans-serif);
}

/* Content */

.cc-banner__title {
  font-family: var(--font-display, 'Bricolage Grotesque', system-ui, sans-serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
}

.cc-banner__text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

.cc-banner__link {
  color: #3B82F6;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-banner__link:hover {
  color: #06D6A0;
}

/* Categories */

.cc-banner__categories {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cc-category {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cc-category:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(59, 130, 246, 0.15);
}

.cc-category input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-category__check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  position: relative;
  margin-top: 2px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

/* Checked state */
.cc-category input:checked + .cc-category__check {
  background: #3B82F6;
  border-color: #3B82F6;
}

.cc-category input:checked + .cc-category__check::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 7px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Locked (necessary) */
.cc-category__check--locked {
  background: rgba(6, 214, 160, 0.15);
  border-color: rgba(6, 214, 160, 0.4);
  cursor: not-allowed;
}

.cc-category__check--locked::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 7px;
  width: 5px;
  height: 9px;
  border: solid #06D6A0;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.cc-category__info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.cc-category__info strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}

.cc-category__info span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

/* Actions */

.cc-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1.25rem;
}

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-body, 'Outfit', system-ui, sans-serif);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  line-height: 1;
}

.cc-btn:focus-visible {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}

/* Accept — Primary */
.cc-btn--accept {
  background: #3B82F6;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.3);
}

.cc-btn--accept:hover {
  background: #2563EB;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

/* Reject — Ghost */
.cc-btn--reject {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.2);
}

.cc-btn--reject:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

/* Settings — Text link style */
.cc-btn--settings {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-btn--settings:hover {
  color: #fff;
}

/* Save — Secondary */
.cc-btn--save {
  background: rgba(6, 214, 160, 0.12);
  color: #06D6A0;
  border-color: rgba(6, 214, 160, 0.25);
}

.cc-btn--save:hover {
  background: rgba(6, 214, 160, 0.2);
  border-color: rgba(6, 214, 160, 0.4);
  transform: translateY(-1px);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
  .cc-banner {
    padding: 0 0.75rem 0.75rem;
  }

  .cc-banner__inner {
    padding: 1.25rem 1.25rem;
    border-radius: 12px;
  }

  .cc-banner__title {
    font-size: 1rem;
  }

  .cc-banner__text {
    font-size: 0.8rem;
  }

  .cc-banner__actions {
    flex-direction: column;
  }

  .cc-btn {
    width: 100%;
    justify-content: center;
  }

  .cc-btn--settings {
    order: 10;
    width: auto;
    align-self: center;
  }

  .cc-category {
    padding: 0.625rem 0.75rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cc-banner {
    transition: none;
  }

  .cc-btn {
    transition: none;
  }

  .cc-btn:hover {
    transform: none;
  }
}
