/* WaReno Cookie-Consent — Styling
   Modal-Overlay, Buttons, Toggle-Switches, Responsive.
   Brand-Farben: #365b96 (primär), #28315f (dunkel), #F8FAFC (canvas).
*/

/* ===== Root & Backdrop ===== */
.wc-root {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  font-family: 'Satoshi', system-ui, -apple-system, 'Segoe UI', sans-serif;
  display: none;
}
.wc-root[aria-hidden="false"] { display: block; }

.wc-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  animation: wc-fade 0.2s ease;
}

/* ===== Modal-Container ===== */
.wc-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}

.wc-modal > .wc-view {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22), 0 6px 20px rgba(15, 23, 42, 0.08);
  padding: 32px;
  max-width: 540px;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  pointer-events: auto;
  animation: wc-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-overflow-scrolling: touch;
}

@keyframes wc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wc-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Typografie ===== */
.wc-title {
  font-size: 20px;
  font-weight: 700;
  color: #28315f;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.3;
}

.wc-desc {
  font-size: 14px;
  color: #475569;
  line-height: 1.65;
  margin: 0 0 24px;
}
.wc-desc a {
  color: #365b96;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== Buttons ===== */
.wc-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.wc-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  line-height: 1.2;
  width: 100%;
  text-align: center;
}
.wc-btn:focus-visible {
  outline: 2px solid #365b96;
  outline-offset: 2px;
}

.wc-btn-primary {
  background: #365b96;
  color: #fff;
  border-color: #365b96;
}
.wc-btn-primary:hover { background: #2d4e84; border-color: #2d4e84; }

.wc-btn-secondary {
  background: transparent;
  color: #365b96;
  border-color: #cbd5e1;
}
.wc-btn-secondary:hover { background: #f1f5f9; border-color: #94a3b8; }

.wc-btn-ghost {
  background: transparent;
  color: #475569;
  border-color: transparent;
  font-weight: 500;
}
.wc-btn-ghost:hover { color: #28315f; background: #f8fafc; }

/* ===== Kategorien (Settings-View) ===== */
.wc-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 4px;
}

.wc-cat {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  background: #f8fafc;
}

.wc-cat-head {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
}

.wc-cat-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.wc-cat-name {
  font-size: 14px;
  font-weight: 600;
  color: #28315f;
}

.wc-cat-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e0e7ef;
  color: #475569;
  letter-spacing: 0.02em;
}

.wc-cat-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.55;
  margin: 8px 0 0 58px;
}

/* ===== Toggle-Switch (accessible Checkbox) ===== */
.wc-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.wc-toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.wc-toggle-track {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s;
}
.wc-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s;
}
.wc-toggle-input:checked + .wc-toggle-track { background: #365b96; }
.wc-toggle-input:checked + .wc-toggle-track::after { transform: translateX(20px); }
.wc-toggle-input:disabled + .wc-toggle-track { background: #94a3b8; cursor: not-allowed; }
.wc-toggle-input:focus-visible + .wc-toggle-track {
  outline: 2px solid #365b96;
  outline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 540px) {
  .wc-modal > .wc-view { padding: 22px 18px; border-radius: 14px; }
  .wc-title { font-size: 18px; }
  .wc-desc { font-size: 13px; margin-bottom: 18px; }
  .wc-cat { padding: 12px 14px; }
  .wc-cat-desc { margin: 10px 0 0; }
  .wc-cat-head { flex-wrap: wrap; }
}
@media (min-width: 540px) {
  .wc-actions { flex-direction: row; flex-wrap: wrap; }
  .wc-btn { width: auto; flex: 1; min-width: 140px; }
}

/* Reduced-Motion respektieren */
@media (prefers-reduced-motion: reduce) {
  .wc-backdrop, .wc-modal > .wc-view { animation: none; }
  .wc-toggle-track, .wc-toggle-track::after, .wc-btn { transition: none; }
}
