/* ============================================
   Gewinnspiele24.eu – Cookie Consent Manager
   ============================================ */

:root {
  --cc-bg: #ffffff;
  --cc-text: #1f2937;
  --cc-muted: #6b7280;
  --cc-border: #e5e7eb;
  --cc-primary: #1565c0;
  --cc-primary-dark: #0d47a1;
  --cc-accent: #ff8f00;
  --cc-radius: 16px;
  --cc-shadow: 0 20px 70px rgba(15, 23, 42, 0.28);
  --cc-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

.cc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
}

.cc-banner,
.cc-modal {
  font-family: var(--cc-font);
  color: var(--cc-text);
  background: var(--cc-bg);
  box-shadow: var(--cc-shadow);
  border: 1px solid var(--cc-border);
}

.cc-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 9999;
  width: min(1120px, calc(100% - 32px));
  border-radius: var(--cc-radius);
  padding: 20px;
}

.cc-banner__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}

.cc-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: #111827;
}

.cc-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--cc-muted);
  margin: 0;
}

.cc-text a { color: var(--cc-primary); font-weight: 600; text-decoration: none; }
.cc-text a:hover { color: var(--cc-primary-dark); text-decoration: underline; }

.cc-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.cc-btn {
  appearance: none;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--cc-font);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  padding: 12px 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.cc-btn:hover { transform: translateY(-1px); }
.cc-btn:focus-visible { outline: 3px solid rgba(21, 101, 192, 0.28); outline-offset: 2px; }

.cc-btn--primary {
  background: linear-gradient(135deg, var(--cc-accent), #e65100);
  color: #fff;
  box-shadow: 0 8px 22px rgba(255, 143, 0, 0.28);
}

.cc-btn--primary:hover { box-shadow: 0 10px 26px rgba(255, 143, 0, 0.36); }

.cc-btn--secondary {
  background: var(--cc-primary);
  color: #fff;
}

.cc-btn--secondary:hover { background: var(--cc-primary-dark); }

.cc-btn--outline {
  background: #fff;
  color: var(--cc-primary);
  border-color: rgba(21, 101, 192, 0.25);
}

.cc-btn--outline:hover { border-color: var(--cc-primary); background: rgba(21, 101, 192, 0.05); }

.cc-modal {
  position: fixed;
  z-index: 9999;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: var(--cc-radius);
}

.cc-modal__header,
.cc-modal__body,
.cc-modal__footer { padding: 22px 24px; }

.cc-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid var(--cc-border);
}

.cc-modal__header .cc-title { margin: 0; }

.cc-close {
  appearance: none;
  background: #f3f4f6;
  border: 0;
  border-radius: 999px;
  color: #374151;
  cursor: pointer;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
}

.cc-close:hover { background: #e5e7eb; }

.cc-category {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--cc-border);
}
.cc-category:last-child { border-bottom: 0; }

.cc-category h3 {
  font-size: 0.98rem;
  font-weight: 800;
  margin: 0 0 4px;
  color: #111827;
}

.cc-category p {
  margin: 0;
  color: var(--cc-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.cc-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
  margin-top: 2px;
}

.cc-switch input { opacity: 0; width: 0; height: 0; }

.cc-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d1d5db;
  border-radius: 999px;
  transition: 0.22s ease;
}

.cc-slider::before {
  content: '';
  position: absolute;
  height: 24px;
  width: 24px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: 0.22s ease;
}

.cc-switch input:checked + .cc-slider { background: var(--cc-primary); }
.cc-switch input:checked + .cc-slider::before { transform: translateX(22px); }
.cc-switch input:disabled + .cc-slider { cursor: not-allowed; opacity: 0.75; }

.cc-modal__footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--cc-border);
  background: #f9fafb;
}

.cc-reopen {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 9997;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--cc-primary);
  box-shadow: none;
  cursor: pointer;
  appearance: none;
}

.cc-reopen__icon {
  display: block;
  width: 26px;
  height: 26px;
}

.cc-reopen:hover { color: var(--cc-primary-dark); background: transparent; }
.cc-reopen:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

@media (max-width: 760px) {
  .cc-banner { bottom: 12px; width: calc(100% - 24px); padding: 18px; }
  .cc-banner__inner { grid-template-columns: 1fr; }
  .cc-actions { justify-content: stretch; }
  .cc-actions .cc-btn { flex: 1 1 100%; }
  .cc-modal__header,
  .cc-modal__body,
  .cc-modal__footer { padding: 18px; }
  .cc-category { grid-template-columns: 1fr; }
  .cc-modal__footer .cc-btn { flex: 1 1 100%; }
  .cc-reopen { left: 12px; bottom: 12px; }
}
