/* Die Hex-Werte sind Platzhalter: process.php ersetzt sie wortgleich durch die
   Farben aus dem Adminbereich. Beim Aendern die Schreibweise beibehalten. */
.cn-cookie-banner {
  display: none; /* Wird durch cookiebanner.js eingeblendet */
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 760px;
  width: calc(100% - 48px);
  background-color: #ffffff;
  color: #000000;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.06);
  text-align: left;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
  z-index: 1000;
  box-sizing: border-box;
  animation: cn-cookie-in 0.3s ease-out;
}

.cn-cookie-banner * {
  box-sizing: border-box;
}

@keyframes cn-cookie-in {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.cn-cookie-banner p strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}

.cn-cookie-banner p {
  margin: 0 0 18px;
  padding: 0;
  width: 100%;
  max-width: none;
  font-size: inherit;
  line-height: inherit;
}

.cn-cookie-banner a {
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  font-size: inherit;
}

.cn-cookie-banner a:hover {
  text-decoration-thickness: 2px;
}

.cn-cookie-banner button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  background-color: #808080;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.cn-cookie-banner button:hover {
  background-color: #585858;
}

.cn-cookie-banner button:active {
  transform: translateY(1px);
}

/* Modus "consent": beide Knoepfe erben dieselbe Regel oben. Waere einer
   auffaelliger als der andere, waere die Einwilligung nicht freiwillig.
   Hier kommt nur das Layout dazu; im Modus "hinweis" fehlt .cn-cookie-actions. */
.cn-cookie-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cn-cookie-actions button {
  flex: 0 1 200px;
}

/* Fokus-Indikator nie ersatzlos entfernen – der Banner ist auf jeder Seite
   das erste, was per Tastatur erreicht wird. */
.cn-cookie-banner button:focus-visible,
.cn-cookie-banner a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

@media screen and (max-width: 479px) {
  .cn-cookie-banner {
    bottom: 12px;
    width: calc(100% - 24px);
    padding: 20px;
    border-radius: 14px;
    font-size: 14px;
  }
  .cn-cookie-banner p strong { font-size: 17px; }
  .cn-cookie-actions button { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cn-cookie-banner { animation: none; }
  .cn-cookie-banner button { transition: none; }
}

/* Modus "consent": Widerruf, wenn die Seite keinen eigenen Ausloeser hat */
#cn-cookie-settings-fab {
  position: fixed;
  left: 20px;
  bottom: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 36px;
  padding: 0;
  margin: 0;
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #ddd;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: height 0.15s ease;
}

#cn-cookie-settings-fab:hover {
  height: 40px;
}

#cn-cookie-settings-fab[hidden] {
  display: none;
}

#cn-cookie-settings-fab svg {
  display: block;
}

#cn-cookie-settings-fab:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

@media screen and (max-width: 479px) {
  #cn-cookie-settings-fab { left: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  #cn-cookie-settings-fab { transition: none; }
}
