/**
 * Terracryl Cookie Consent – schwebende Karte im Stil bekannter,
 * hochwertiger Consent-Tools (z. B. Borlabs Cookie): kompakt, seriös,
 * unten links positioniert, mit sanfter Einblendung, Toggle-Switches
 * statt einfacher Checkboxen und einer klaren Zwei-Ansichten-Struktur
 * (Kurzinfo -> Detail-Einstellungen).
 */
:root{
  --tc-radius: 16px;
  --tc-primary: #E3130F;
  --tc-text: #1c2023;
  --tc-text-muted: #6b7378;
  --tc-border: #ecedee;
}

.tc-cookie-banner{
  position: fixed; left: 24px; bottom: 24px; z-index: 99999;
  max-width: 400px; width: calc(100% - 48px);
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  animation: tc-cookie-in .4s cubic-bezier(.2,.8,.2,1);
}
.tc-cookie-banner[hidden]{ display:none; }

@keyframes tc-cookie-in{
  from{ opacity:0; transform: translateY(16px); }
  to{ opacity:1; transform: translateY(0); }
}

.tc-cookie-banner__card{
  background:#fff; color: var(--tc-text);
  border-radius: var(--tc-radius);
  box-shadow: 0 20px 50px rgba(17,21,23,.22), 0 2px 8px rgba(17,21,23,.08);
  padding: 26px 26px 22px;
  border: 1px solid var(--tc-border);
}

.tc-cookie-banner__brand img{ height: 22px; width:auto; margin-bottom: 14px; filter: grayscale(1) contrast(1.4); opacity:.85; }

.tc-cookie-banner__view h2{
  font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
  font-size: 1.05rem; font-weight:700; margin: 0 0 8px; color: var(--tc-text); letter-spacing:-.01em;
}
.tc-cookie-banner__view p{
  font-size: .87rem; line-height:1.55; color: var(--tc-text-muted); margin: 0 0 18px;
}

.tc-cookie-banner__actions{
  display:flex; flex-direction:column; gap: 10px;
}

.tc-btn{
  text-align:center; width:100%;
  border-radius: 9px; padding: 12px 14px; font-size:.87rem; font-weight:600;
  border: 1.5px solid transparent; cursor:pointer; transition: all .18s ease; font-family: inherit;
  white-space: nowrap;
}
.tc-btn--primary{ background: var(--tc-primary); color:#fff; }
.tc-btn--primary:hover{ background:#b90f0b; }
.tc-btn--outline{ background:#fff; border-color: var(--tc-border); color: var(--tc-text); }
.tc-btn--outline:hover{ background: #f6f7f8; }
.tc-btn--ghost{ background:transparent; color: var(--tc-text-muted); border-color: var(--tc-border); }
.tc-btn--ghost:hover{ background:#f6f7f8; color: var(--tc-text); }

.tc-cookie-banner__legal-link{
  display:block; text-align:center; margin-top: 14px; font-size:.76rem;
  color: var(--tc-text-muted); text-decoration: underline; text-underline-offset: 2px;
}
.tc-cookie-banner__legal-link:hover{ color: var(--tc-text); }

/* Settings view */
.tc-cookie-banner__back{
  display:inline-flex; align-items:center; gap:5px; background:none; border:none; cursor:pointer;
  color: var(--tc-text-muted); font-size:.8rem; font-weight:600; padding:0; margin-bottom: 12px; font-family: inherit;
}
.tc-cookie-banner__back:hover{ color: var(--tc-text); }

.tc-cookie-banner__categories{ display:flex; flex-direction:column; gap: 14px; margin-bottom: 18px; max-height: 260px; overflow-y:auto; }
.tc-cookie-cat{ padding: 12px 0; border-bottom: 1px solid var(--tc-border); }
.tc-cookie-cat:last-child{ border-bottom:none; padding-bottom:0; }
.tc-cookie-cat__head{ display:flex; align-items:center; justify-content:space-between; margin-bottom: 5px; }
.tc-cookie-cat__label{ font-size:.88rem; font-weight:600; color: var(--tc-text); }
.tc-cookie-cat p{ margin:0; font-size:.78rem; line-height:1.5; color: var(--tc-text-muted); }

/* Toggle switch */
.tc-switch{ position:relative; display:inline-block; width: 38px; height: 22px; flex-shrink:0; }
.tc-switch input{ position:absolute; opacity:0; width:100%; height:100%; margin:0; cursor:pointer; }
.tc-switch__track{
  position:absolute; inset:0; background: #d8dbdd; border-radius: 999px; transition: background .2s ease;
}
.tc-switch__thumb{
  position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:#fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s ease;
}
.tc-switch input:checked + .tc-switch__track{ background: var(--tc-primary); }
.tc-switch input:checked + .tc-switch__track .tc-switch__thumb{ transform: translateX(16px); }
.tc-switch input:disabled + .tc-switch__track{ background:#f0a09e; cursor:not-allowed; }
.tc-switch input:focus-visible + .tc-switch__track{ outline: 2px solid var(--tc-primary); outline-offset: 2px; }

@media (max-width: 520px){
  .tc-cookie-banner{ left:12px; right:12px; bottom:12px; width:auto; max-width:none; }
  .tc-cookie-banner__card{ padding: 22px 20px 18px; }
}
