/* cookie-consent.css — HARIS Hausmeisterservice
 * Styles für den DSGVO/TDDDG-konformen Cookie-Banner
 */

/* ── Strip (simple view, fixed bottom bar) ──────────────────────────────── */
.cc-strip {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0B2447;
  z-index: 9990;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, .3);
}

.cc-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.cc-msg {
  flex: 1;
  color: #d6dce6;
  font-size: .875rem;
  line-height: 1.55;
  margin: 0;
  min-width: 200px;
}

.cc-link {
  color: #1F9D6E;
  text-decoration: underline;
}
.cc-link:hover { color: #2bc68e; }

.cc-actions {
  display: flex;
  gap: .625rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.cc-btn {
  border: none;
  border-radius: 6px;
  padding: .6rem 1.125rem;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
  font-family: inherit;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Green — Alle akzeptieren */
.cc-primary { background: #1F9D6E; color: #fff; }
.cc-primary:hover, .cc-primary:focus-visible { background: #167A55; }

/* Navy filled — Nur notwendige / Auswahl speichern */
.cc-secondary { background: #fff; color: #0B2447; }
.cc-secondary:hover, .cc-secondary:focus-visible { background: #e4eaf3; }

/* Ghost — Einstellungen */
.cc-ghost {
  background: transparent;
  color: #d6dce6;
  border: 1.5px solid rgba(255, 255, 255, .35);
}
.cc-ghost:hover, .cc-ghost:focus-visible {
  border-color: rgba(255, 255, 255, .75);
  color: #fff;
}

/* ── Backdrop (settings modal overlay) ──────────────────────────────────── */
.cc-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 36, 71, .65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* ── Modal box ──────────────────────────────────────────────────────────── */
.cc-modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, .25);
  width: 100%;
  max-width: 500px;
  padding: 1.5rem;
  max-height: 90vh;
  overflow-y: auto;
}

.cc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cc-modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0B2447;
  margin: 0;
}

.cc-close {
  background: none;
  border: none;
  font-size: 1rem;
  color: #888;
  cursor: pointer;
  padding: 0;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background .15s, color .15s;
  font-family: inherit;
}
.cc-close:hover, .cc-close:focus-visible {
  background: #f0f4f8;
  color: #333;
}

/* ── Category rows ──────────────────────────────────────────────────────── */
.cc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .875rem 0;
  border-top: 1px solid #e8ecf0;
}

.cc-row-info {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.cc-row-info strong {
  font-size: .9375rem;
  color: #0E1320;
  font-weight: 600;
}
.cc-row-info span {
  font-size: .8125rem;
  color: #666;
  line-height: 1.45;
}

/* ── Toggle switch ──────────────────────────────────────────────────────── */
.cc-tog {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
  display: block;
}

.cc-tog input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cc-knob {
  position: absolute;
  inset: 0;
  background: #c8cdd6;
  border-radius: 26px;
  transition: background .2s;
}
.cc-knob::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
  transition: transform .2s;
}

/* Checked state */
.cc-tog input:checked ~ .cc-knob { background: #1F9D6E; }
.cc-tog input:checked ~ .cc-knob::after { transform: translateX(22px); }

/* Locked "always on" toggle */
.cc-tog-locked {
  cursor: default;
}
.cc-tog-locked .cc-knob { background: #1F9D6E; opacity: .7; }
.cc-tog-locked .cc-knob::after { transform: translateX(22px); }

/* ── Modal footer ───────────────────────────────────────────────────────── */
.cc-modal-foot {
  display: flex;
  gap: .75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.cc-modal-foot .cc-btn { flex: 1; }
/* In modal, secondary = navy */
.cc-modal-foot .cc-secondary {
  background: #0B2447;
  color: #fff;
}
.cc-modal-foot .cc-secondary:hover,
.cc-modal-foot .cc-secondary:focus-visible {
  background: #0A1A33;
}

/* ── Footer settings button ─────────────────────────────────────────────── */
.cc-foot-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, .4);
  font-size: .8125rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
  transition: color .15s;
}
.cc-foot-btn:hover, .cc-foot-btn:focus-visible {
  color: rgba(255, 255, 255, .75);
}

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .cc-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }
  .cc-actions {
    flex-direction: column;
  }
  .cc-btn {
    width: 100%;
  }
  .cc-modal {
    border-radius: 10px;
    padding: 1.25rem;
  }
}
