/* Cookie Consent – Design passend zum FlowTrail/ShredOps-Stil */

/* ── Banner ──────────────────────────────────────────────────────────────── */
#cc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: #fff;
  border-top: 1px solid #e2e5f0;
  box-shadow: 0 -4px 32px rgba(21, 27, 42, .10);
  padding: 20px 24px;
  transform: translateY(110%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  font-family: Inter, system-ui, sans-serif;
}
#cc-banner.cc-visible { transform: translateY(0); }

.cc-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cc-content { flex: 1; min-width: 240px; }
.cc-title {
  font-size: 14px;
  font-weight: 700;
  color: #151b2a;
  margin: 0 0 4px;
  letter-spacing: -.01em;
}
.cc-body {
  font-size: 13px;
  color: #45474c;
  margin: 0;
  line-height: 1.55;
}
.cc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
  line-height: 1.2;
}
.cc-btn--primary {
  background: #151b2a;
  color: #fff;
}
.cc-btn--primary:hover { background: #2a3348; }
.cc-btn--outline {
  background: transparent;
  color: #151b2a;
  border: 1.5px solid #c6c6cc;
}
.cc-btn--outline:hover { border-color: #151b2a; background: #f1f3ff; }
.cc-btn--ghost {
  background: transparent;
  color: #45474c;
  padding-left: 8px;
  padding-right: 8px;
}
.cc-btn--ghost:hover { color: #151b2a; text-decoration: underline; }

.cc-link {
  color: #006e2d;
  text-decoration: none;
  font-weight: 500;
}
.cc-link:hover { text-decoration: underline; }

/* ── Modal overlay ──────────────────────────────────────────────────────── */
#cc-modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(21, 27, 42, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity .25s;
  font-family: Inter, system-ui, sans-serif;
}
#cc-modal-wrap.cc-visible { opacity: 1; }

@media (min-width: 640px) {
  #cc-modal-wrap { align-items: center; }
}

#cc-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(21, 27, 42, .20);
  transform: translateY(20px);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
#cc-modal-wrap.cc-visible #cc-modal { transform: translateY(0); }

.cc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e9edff;
}
.cc-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #151b2a;
  letter-spacing: -.01em;
}
.cc-close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #76777d;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .15s;
  font-family: inherit;
  line-height: 1;
}
.cc-close-btn:hover { background: #f1f3ff; color: #151b2a; }

/* ── Category list ──────────────────────────────────────────────────────── */
.cc-cats {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px;
}
.cc-cat {
  padding: 14px 0;
  border-bottom: 1px solid #f1f3ff;
}
.cc-cat:last-child { border-bottom: none; }
.cc-cat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.cc-cat-info { flex: 1; }
.cc-cat-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #151b2a;
  margin-bottom: 3px;
}
.cc-cat-desc {
  font-size: 12px;
  color: #45474c;
  margin: 0;
  line-height: 1.5;
}

/* ── Toggle switch ──────────────────────────────────────────────────────── */
.cc-switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  margin-top: 2px;
  cursor: pointer;
}
.cc-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.cc-slider {
  width: 40px;
  height: 22px;
  background: #c6c6cc;
  border-radius: 11px;
  transition: background .2s;
  display: block;
  position: relative;
}
.cc-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.cc-switch input:checked + .cc-slider { background: #006e2d; }
.cc-switch input:checked + .cc-slider::after { transform: translateX(18px); }
.cc-switch input:disabled + .cc-slider { background: #7ffc97; opacity: .6; cursor: not-allowed; }
.cc-switch input:focus-visible + .cc-slider { outline: 2px solid #006e2d; outline-offset: 2px; }

/* ── Modal footer ───────────────────────────────────────────────────────── */
.cc-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 24px 20px;
  border-top: 1px solid #e9edff;
}
.cc-foot-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Re-open button ─────────────────────────────────────────────────────── */
#cc-reopen {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 8900;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid #c6c6cc;
  box-shadow: 0 2px 12px rgba(21,27,42,.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #45474c;
  transition: box-shadow .15s, color .15s, border-color .15s;
  padding: 0;
}
#cc-reopen:hover {
  color: #006e2d;
  border-color: #006e2d;
  box-shadow: 0 4px 16px rgba(0,110,45,.18);
}
#cc-reopen svg { display: block; }

/* ── Dark mode (matches existing [data-theme="dark"]) ───────────────────── */
@media (prefers-color-scheme: dark) {
  #cc-banner, #cc-modal {
    background: #1e2433;
    border-color: #2e3448;
  }
  #cc-banner { border-color: #2e3448; box-shadow: 0 -4px 32px rgba(0,0,0,.3); }
  .cc-title, .cc-modal-title, .cc-cat-name { color: #edf0ff; }
  .cc-body, .cc-cat-desc, .cc-btn--ghost { color: #9da0ab; }
  .cc-btn--outline { color: #edf0ff; border-color: #45474c; }
  .cc-btn--outline:hover { background: #2e3448; border-color: #edf0ff; }
  .cc-btn--ghost:hover { color: #edf0ff; }
  .cc-btn--primary { background: #edf0ff; color: #151b2a; }
  .cc-btn--primary:hover { background: #c0c6da; }
  .cc-close-btn { color: #9da0ab; }
  .cc-close-btn:hover { background: #2e3448; color: #edf0ff; }
  .cc-cat { border-color: #2e3448; }
  .cc-modal-head, .cc-modal-foot { border-color: #2e3448; }
  .cc-modal-foot { background: #1e2433; }
  #cc-reopen { background: #1e2433; border-color: #45474c; color: #9da0ab; }
  #cc-reopen:hover { color: #7ffc97; border-color: #7ffc97; }
  #cc-modal-wrap { background: rgba(0,0,0,.55); }
}
