/* ═══════════════════════════════════════════════════════════════════
   POS.itive Cookie Banner — Styling (passt zur Brand)
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --cb-green: #0E8A3E;
  --cb-green-light: #3DAE2B;
  --cb-bg: #FAFAF8;
  --cb-text: #1a1a1a;
  --cb-text-mid: #555;
  --cb-border: #e5e5e0;
}

#cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  z-index: 99998;
  background: #fff;
  border: 1px solid var(--cb-border);
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,.18);
  font-family: 'Outfit', 'DM Sans', system-ui, -apple-system, sans-serif;
  animation: cb-in .35s cubic-bezier(.2,.8,.2,1);
}
@keyframes cb-in { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
#cookie-banner.cb-hidden { display: none; }

.cb-inner { display: flex; gap: 24px; align-items: center; padding: 20px 24px; flex-wrap: wrap; }
.cb-text { flex: 1 1 320px; min-width: 280px; }
.cb-text h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; color: var(--cb-text); }
.cb-text p { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--cb-text-mid); }
.cb-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.cb-btn {
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--cb-border);
  background: #fff;
  color: var(--cb-text);
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.cb-btn:hover { border-color: var(--cb-text); }
.cb-btn--primary {
  background: var(--cb-green);
  border-color: var(--cb-green);
  color: #fff;
}
.cb-btn--primary:hover { background: var(--cb-green-light); border-color: var(--cb-green-light); }

@media (max-width: 720px) {
  #cookie-banner { left: 8px; right: 8px; bottom: 8px; }
  .cb-inner { padding: 16px 18px; gap: 16px; }
  .cb-actions { width: 100%; }
  .cb-btn { flex: 1 1 0; min-width: 0; padding: 12px 8px; font-size: .82rem; }
}

/* ─── Settings-Modal ─────────────────────────────────────────── */
#cookie-modal {
  position: fixed; inset: 0; z-index: 99999;
  display: none;
  font-family: 'Outfit', 'DM Sans', system-ui, sans-serif;
}
#cookie-modal.cm-visible { display: block; }
.cm-backdrop {
  position: absolute; inset: 0;
  background: rgba(20,20,20,.6);
  backdrop-filter: blur(4px);
}
.cm-dialog {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 28px 32px 24px;
  box-shadow: 0 20px 80px rgba(0,0,0,.3);
}
.cm-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: 0; font-size: 28px;
  cursor: pointer; color: var(--cb-text-mid);
  width: 32px; height: 32px; line-height: 1;
}
.cm-close:hover { color: var(--cb-text); }
.cm-dialog h2 { margin: 0 0 8px; font-size: 1.25rem; }
.cm-intro { margin: 0 0 20px; font-size: .9rem; color: var(--cb-text-mid); line-height: 1.55; }
.cm-row {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 16px 0; border-top: 1px solid var(--cb-border);
}
.cm-row > div:first-child { flex: 1; }
.cm-row strong { display: block; margin-bottom: 4px; font-size: .95rem; }
.cm-row p { margin: 0; font-size: .82rem; color: var(--cb-text-mid); line-height: 1.5; }

/* Toggle-Switch */
.cm-toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.cm-toggle input { display: none; }
.cm-slider {
  position: absolute; cursor: pointer; inset: 0;
  background-color: #ccc; border-radius: 24px; transition: .2s;
}
.cm-slider:before {
  content: ''; position: absolute; height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: .2s;
}
.cm-toggle input:checked + .cm-slider { background: var(--cb-green); }
.cm-toggle input:checked + .cm-slider:before { transform: translateX(20px); }
.cm-toggle input:disabled + .cm-slider { background: var(--cb-green-light); cursor: not-allowed; opacity: .6; }

.cm-actions {
  display: flex; gap: 8px; margin-top: 20px;
  padding-top: 16px; border-top: 1px solid var(--cb-border);
}
.cm-actions .cb-btn { flex: 1; padding: 11px 10px; font-size: .85rem; }
.cm-links { margin: 16px 0 0; font-size: .78rem; color: var(--cb-text-mid); text-align: center; }
.cm-links a { color: var(--cb-green); text-decoration: none; }
.cm-links a:hover { text-decoration: underline; }

@media (max-width: 540px) {
  .cm-dialog { padding: 24px 20px 18px; }
  .cm-actions { flex-direction: column; }
  .cm-actions .cb-btn { width: 100%; }
}
