/* ==========================================================================
   SC Consent - eigenes Einwilligungs-Banner von SuchyCREATIVE
   Selbst gehostet. Laedt nichts von fremden Domains.
   Farben/Schriften kommen aus den CSS-Variablen unten und lassen sich je
   Projekt ueberschreiben, ohne diese Datei anzufassen.
   ========================================================================== */

.sc-cc,
.sc-cc *,
.sc-cc *::before,
.sc-cc *::after { box-sizing: border-box; }

/* Schutz gegen die Gestaltung der Website: Ueberschriften und Absaetze im
   Dialog duerfen NICHT vom Template eingefaerbt oder umgeschriftet werden.
   (Auf suchycreative.de setzt das Template h2/h3 auf "Amatic SC" - damit
   waeren die Kategorienamen kaum lesbar gewesen.) */
.sc-cc h2,
.sc-cc h3,
.sc-cc p,
.sc-cc ul,
.sc-cc li,
.sc-cc span,
.sc-cc label,
.sc-cc a,
.sc-cc button,
.sc-cc-placeholder p,
.sc-cc-placeholder b,
.sc-cc-placeholder button {
  font-family: var(--sc-cc-font);
  text-transform: none;
  letter-spacing: normal;
  font-style: normal;
  text-align: left;
  text-shadow: none;
}

.sc-cc ul { list-style: none; }
.sc-cc li::before { content: none; }
.sc-cc button,
.sc-cc-placeholder button,
.sc-cc-placeholder p { text-align: center; }
.sc-cc-placeholder p { margin: 0; }

/* Diese Werte duerfen Projekte ueberschreiben (z. B. in der eigenen CSS) */
:root {
  --sc-cc-bg:        #ffffff;
  --sc-cc-fg:        #444444;
  --sc-cc-muted:     #6b6b6b;
  --sc-cc-line:      #dcdcdc;
  --sc-cc-accent:    #cad759;   /* Akzent aus dem Template sc0515 */
  --sc-cc-accent-fg: #2b2b2b;
  --sc-cc-dark:      #444444;
  --sc-cc-dark-fg:   #ffffff;
  --sc-cc-radius:    0px;       /* Template arbeitet mit scharfen Ecken */
  --sc-cc-font:      "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --sc-cc-title-font: "Amatic SC", var(--sc-cc-font);
  --sc-cc-z:         2147483000;
}

.sc-cc {
  position: fixed;
  inset: 0;
  z-index: var(--sc-cc-z);
  font-family: var(--sc-cc-font);
  color: var(--sc-cc-fg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.sc-cc[hidden] { display: none !important; }

/* Abdunkelung dahinter - dezent, die Seite bleibt sichtbar */
.sc-cc__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .38);
  animation: sc-cc-fade .2s ease-out;
}

@keyframes sc-cc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sc-cc-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------- Karte -- */

.sc-cc__card {
  position: absolute;
  background: var(--sc-cc-bg);
  border: 1px solid var(--sc-cc-line);
  border-radius: var(--sc-cc-radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .22);
  animation: sc-cc-rise .22s ease-out;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
}

/* Erste Ebene: kleine Karte unten links, nicht bildschirmfuellend */
.sc-cc--banner .sc-cc__card {
  left: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: 460px;
  max-width: calc(100vw - 48px);
}

/* Zweite Ebene: mittiger Dialog */
.sc-cc--settings .sc-cc__card {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 620px;
  max-width: calc(100vw - 32px);
  max-height: min(84vh, 84dvh);
  animation: sc-cc-fade .2s ease-out;
}

.sc-cc__head {
  padding: 22px 24px 0 24px;
  flex: 0 0 auto;
}

.sc-cc .sc-cc__title {
  margin: 0 0 10px 0;
  font-family: var(--sc-cc-title-font);
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--sc-cc-fg);
  letter-spacing: .3px;
}

.sc-cc__body {
  padding: 0 24px;
  flex: 0 1 auto;
  min-height: 0;          /* sonst waechst der Bereich ueber die Karte hinaus */
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sc-cc__text {
  margin: 0 0 14px 0;
  font-size: 14.5px;
  color: var(--sc-cc-fg);
}

.sc-cc__text--small {
  font-size: 13px;
  color: var(--sc-cc-muted);
}

.sc-cc__foot {
  padding: 16px 24px calc(20px + env(safe-area-inset-bottom, 0px)) 24px;
  flex: 0 0 auto;
  background: var(--sc-cc-bg);
  border-top: 1px solid transparent;
}

.sc-cc--settings .sc-cc__foot {
  border-top-color: var(--sc-cc-line);
}

/* Zarter Schatten an der Kante, solange es noch etwas zu scrollen gibt -
   sonst uebersieht man die dritte Kategorie. */
.sc-cc--settings .sc-cc__body {
  background:
    linear-gradient(var(--sc-cc-bg) 30%, rgba(255, 255, 255, 0)) top / 100% 22px no-repeat,
    linear-gradient(rgba(255, 255, 255, 0), var(--sc-cc-bg) 70%) bottom / 100% 22px no-repeat,
    radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, .13), rgba(0, 0, 0, 0)) top / 100% 9px no-repeat,
    radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, .13), rgba(0, 0, 0, 0)) bottom / 100% 9px no-repeat;
  background-attachment: local, local, scroll, scroll;
}

/* ------------------------------------------------------------ Schalter -- */

/* Ablehnen und Akzeptieren liegen immer nebeneinander und sind exakt
   gleich breit - die Entscheidung soll in beide Richtungen gleich leicht
   fallen. Die dritte Schaltflaeche steht darunter ueber die volle Breite. */
.sc-cc__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sc-cc__actions--single {
  grid-template-columns: 1fr;
  margin-top: 10px;
}

.sc-cc__actions > .sc-cc__btn { width: 100%; }

.sc-cc__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  border-radius: var(--sc-cc-radius);
  border: 1px solid var(--sc-cc-dark);
  background: var(--sc-cc-bg);
  color: var(--sc-cc-fg);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s;
  -webkit-appearance: none;
  appearance: none;
}

/* Zustimmen und Ablehnen sind bewusst gleich gross und gleich auffaellig. */
.sc-cc__btn--accept {
  background: var(--sc-cc-accent);
  border-color: var(--sc-cc-accent);
  color: var(--sc-cc-accent-fg);
}

.sc-cc__btn--reject {
  background: var(--sc-cc-dark);
  border-color: var(--sc-cc-dark);
  color: var(--sc-cc-dark-fg);
}

.sc-cc__btn--ghost {
  background: var(--sc-cc-bg);
  border-color: var(--sc-cc-dark);
  color: var(--sc-cc-fg);
}

.sc-cc__btn--accept:hover { filter: brightness(1.06); }
.sc-cc__btn--reject:hover { background: #2b2b2b; border-color: #2b2b2b; }
.sc-cc__btn--ghost:hover  { background: #f2f2f2; }

.sc-cc__btn:focus-visible,
.sc-cc a:focus-visible,
.sc-cc input:focus-visible + .sc-cc__switch {
  outline: 3px solid #434444;
  outline-offset: 2px;
}

/* Fallback fuer Browser ohne :focus-visible */
.sc-cc__btn:focus { outline: 3px solid #434444; outline-offset: 2px; }
.sc-cc__btn:focus:not(:focus-visible) { outline: none; }

/* ----------------------------------------------------------- Fusszeile -- */

.sc-cc__links {
  margin: 14px 0 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 13px;
}

.sc-cc__links a {
  color: var(--sc-cc-muted);
  text-decoration: underline;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}

.sc-cc__links a:hover { color: var(--sc-cc-fg); }

/* ---------------------------------------------------------- Kategorien -- */

.sc-cc__cat {
  border-top: 1px solid var(--sc-cc-line);
  padding: 16px 0;
}

.sc-cc__cat:first-child { border-top: 0; padding-top: 4px; }

.sc-cc__cat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.sc-cc__cat-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--sc-cc-fg);
}

.sc-cc__cat-desc {
  margin: 6px 0 0 0;
  font-size: 13.5px;
  color: var(--sc-cc-muted);
}

.sc-cc__cat--focus {
  background: #fbfce9;
  box-shadow: inset 3px 0 0 var(--sc-cc-accent);
  padding-left: 12px;
}

.sc-cc__services {
  margin: 12px 0 0 0;
  padding: 0;
  list-style: none;
}

.sc-cc__service {
  border-left: 2px solid var(--sc-cc-line);
  padding: 0 0 0 12px;
  margin: 10px 0 0 0;
}

.sc-cc__service-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--sc-cc-fg);
}

.sc-cc__service-desc {
  margin: 2px 0 0 0;
  font-size: 13px;
  color: var(--sc-cc-muted);
}

/* --------------------------------------------------------- Kippschalter -- */

.sc-cc__toggle {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-width: 56px;
  min-height: 44px;   /* Trefferflaeche */
  cursor: pointer;
}

.sc-cc__toggle input {
  position: absolute;
  opacity: 0;
  width: 56px;
  height: 44px;
  margin: 0;
  cursor: pointer;
}

.sc-cc__switch {
  display: block;
  width: 52px;
  height: 28px;
  border-radius: 14px;
  background: #c9c9c9;
  position: relative;
  transition: background-color .15s;
  pointer-events: none;
}

.sc-cc__switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .15s;
}

.sc-cc__toggle input:checked + .sc-cc__switch { background: var(--sc-cc-accent); }
.sc-cc__toggle input:checked + .sc-cc__switch::after { transform: translateX(24px); }
.sc-cc__toggle input:disabled + .sc-cc__switch { opacity: .65; cursor: not-allowed; }

.sc-cc__locked {
  font-size: 12.5px;
  color: var(--sc-cc-muted);
  white-space: nowrap;
  align-self: flex-start;
  padding-top: 4px;
}

/* --------------------------------------------------------------- Mobil -- */

@media (max-width: 640px) {
  .sc-cc--banner .sc-cc__card,
  .sc-cc--settings .sc-cc__card {
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    transform: none;
    width: auto;
    max-width: none;
    max-height: min(92vh, 92dvh);
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .sc-cc__head { padding: 18px 18px 0 18px; }
  .sc-cc__body { padding: 0 18px; }
  .sc-cc__foot { padding: 14px 18px calc(16px + env(safe-area-inset-bottom, 0px)) 18px; }
  .sc-cc__title { font-size: 28px; }
  .sc-cc__actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .sc-cc__card, .sc-cc__backdrop { animation: none; }
  .sc-cc__switch, .sc-cc__switch::after, .sc-cc__btn { transition: none; }
}

/* Hinweis anstelle eines gesperrten Inhalts (Karte, Video o. ae.) */
.sc-cc-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 20px;
  text-align: center;
  background: #f5f5f5;
  border: 1px solid var(--sc-cc-line);
  color: var(--sc-cc-fg);
  font-family: var(--sc-cc-font);
  font-size: 14px;
  line-height: 1.55;
  box-sizing: border-box;
}

.sc-cc-placeholder p { max-width: 46em; }

.sc-cc-placeholder .sc-cc__btn {
  flex: 0 0 auto;
  min-width: 200px;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .sc-cc-placeholder .sc-cc__btn { width: 100%; min-width: 0; }
}
