/* Klarsicht Cookie Consent Banner — Brand v2 */
/* Tannengrün: #1F3B2D | Cream: #F1EAD8 | Stahlblau: #7FA8C4 | Tinte: #14181A */

#kl-consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 26, 0.35);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#kl-consent {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: auto;
  width: 100%;
  max-width: 480px;
  background: #F1EAD8;
  border-top: 3px solid #1F3B2D;
  border-radius: 4px;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(20, 24, 26, 0.18);
  outline: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#kl-consent.kl-consent--visible {
  opacity: 1;
  transform: translateY(0);
}

#kl-consent.kl-consent--visible ~ #kl-consent-overlay {
  opacity: 1;
  pointer-events: auto;
}

#kl-consent.kl-consent--hidden {
  opacity: 0;
  transform: translateY(12px);
}

@media (max-width: 520px) {
  #kl-consent {
    bottom: 0;
    right: 0;
    left: 0;
    max-width: 100%;
    border-radius: 4px 4px 0 0;
  }
}

.kl-consent__inner {
  padding: 1.5rem;
}

.kl-consent__eyebrow {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #7FA8C4;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.kl-consent__headline {
  font-family: 'Inter Tight', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1F3B2D;
  margin: 0 0 0.6rem 0;
  line-height: 1.3;
}

.kl-consent__body {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.82rem;
  color: #14181A;
  line-height: 1.55;
  margin: 0 0 0.35rem 0;
}

.kl-consent__link {
  margin: 0 0 1rem 0;
}

.kl-consent__link a {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.78rem;
  color: #1F3B2D;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.kl-consent__link a:hover {
  color: #7FA8C4;
}

/* Categories */
.kl-consent__categories {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.kl-consent__cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.kl-consent__cat-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.kl-consent__cat-name {
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1F3B2D;
}

.kl-consent__cat-desc {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.72rem;
  color: #14181A;
  opacity: 0.7;
}

/* Toggle Switch */
.kl-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}

.kl-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.kl-toggle__track {
  display: block;
  width: 36px;
  height: 20px;
  background: rgba(20, 24, 26, 0.2);
  border-radius: 10px;
  transition: background 0.2s ease;
  position: relative;
}

.kl-toggle__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: #F1EAD8;
  border-radius: 50%;
  transition: transform 0.2s ease, background 0.2s ease;
  box-shadow: 0 1px 3px rgba(20,24,26,0.25);
}

.kl-toggle input:checked + .kl-toggle__track {
  background: #7FA8C4;
}

.kl-toggle input:checked + .kl-toggle__track::after {
  transform: translateX(16px);
}

.kl-toggle--disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.kl-toggle input:focus-visible + .kl-toggle__track {
  outline: 2px solid #7FA8C4;
  outline-offset: 2px;
}

/* Details */
.kl-consent__details {
  margin-bottom: 1rem;
}

.kl-consent__details summary {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.76rem;
  color: #1F3B2D;
  cursor: pointer;
  user-select: none;
  padding: 0.25rem 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  list-style: none;
}

.kl-consent__details summary::-webkit-details-marker { display: none; }

.kl-consent__details[open] summary {
  margin-bottom: 0.5rem;
}

.kl-consent__table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.7rem;
  color: #14181A;
}

.kl-consent__table th,
.kl-consent__table td {
  padding: 0.3rem 0.4rem;
  border-bottom: 1px solid rgba(31, 59, 45, 0.12);
  text-align: left;
}

.kl-consent__table th {
  font-weight: 600;
  color: #1F3B2D;
}

/* Action Buttons */
.kl-consent__actions {
  display: flex;
  gap: 0.65rem;
}

.kl-btn {
  flex: 1;
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  min-height: 44px;
  line-height: 1;
}

.kl-btn--primary {
  background: #1F3B2D;
  color: #F1EAD8;
  border: 2px solid #1F3B2D;
}

.kl-btn--primary:hover {
  background: #2c5240;
  border-color: #2c5240;
}

.kl-btn--outline {
  background: #F1EAD8;
  color: #1F3B2D;
  border: 2px solid #1F3B2D;
}

.kl-btn--outline:hover {
  background: rgba(31, 59, 45, 0.07);
}

.kl-btn:focus-visible {
  outline: 2px solid #7FA8C4;
  outline-offset: 2px;
}
