/* ==== Cookie consent banner & preferences modal ========================== */

.cc-banner,
.cc-modal-backdrop {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Helvetica, Arial, sans-serif;
  color: #0f172a;
  box-sizing: border-box;
}

.cc-banner *,
.cc-modal-backdrop * {
  box-sizing: border-box;
}

/* ---- Banner -------------------------------------------------------------- */
.cc-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9000;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.18);
  padding: 18px 22px;
  display: none;
  max-width: 1100px;
  margin: 0 auto;
}

.cc-banner.is-open {
  display: block;
}

.cc-banner__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.cc-banner__copy {
  flex: 1 1 320px;
  min-width: 0;
}

.cc-banner__title {
  margin: 0 0 4px 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.cc-banner__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #475569;
}

.cc-banner__text a {
  color: #1d6fff;
  text-decoration: underline;
}

.cc-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cc-btn {
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: 12px;
  letter-spacing: 0.2px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-family: inherit;
}

.cc-btn:focus-visible {
  outline: 2px solid #1d6fff;
  outline-offset: 2px;
}

.cc-btn--primary {
  background: #1d6fff;
  color: #fff;
  box-shadow: 0 6px 16px rgba(29, 111, 255, 0.22);
}

.cc-btn--primary:hover {
  background: #1558e0;
  transform: translateY(-1px);
}

.cc-btn--ghost {
  background: transparent;
  color: #1d6fff;
  border-color: #1d6fff;
}

.cc-btn--ghost:hover {
  background: rgba(29, 111, 255, 0.08);
}

.cc-btn--subtle {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}

.cc-btn--subtle:hover {
  background: #e2e8f0;
}

@media (max-width: 640px) {
  .cc-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 16px;
  }
  .cc-banner__actions {
    width: 100%;
  }
  .cc-btn {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }
}

/* ---- Floating settings reopen button ------------------------------------- */
.cc-settings-btn {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 8000;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.12);
  display: none;
  font-family: inherit;
}

.cc-settings-btn.is-visible {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cc-settings-btn:hover {
  background: #f8fafc;
}

/* ---- Preferences modal --------------------------------------------------- */
.cc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cc-modal-backdrop.is-open {
  display: flex;
}

.cc-modal {
  background: #ffffff;
  border-radius: 18px;
  max-width: 540px;
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow: auto;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.35);
  padding: 24px;
}

.cc-modal__title {
  margin: 0 0 4px 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.cc-modal__intro {
  margin: 0 0 16px 0;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.5;
}

.cc-modal__intro a {
  color: #1d6fff;
  text-decoration: underline;
}

.cc-category {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.cc-category__body {
  flex: 1 1 auto;
  min-width: 0;
}

.cc-category__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.cc-category__desc {
  margin: 4px 0 0 0;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.4;
}

.cc-required {
  color: #16a34a;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Toggle switch */
.cc-toggle {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 42px;
}

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

.cc-toggle__track {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s ease;
  cursor: pointer;
}

.cc-toggle__track::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(2, 6, 23, 0.2);
}

.cc-toggle input:checked + .cc-toggle__track {
  background: #1d6fff;
}

.cc-toggle input:checked + .cc-toggle__track::after {
  transform: translateX(18px);
}

.cc-toggle input:focus-visible + .cc-toggle__track {
  outline: 2px solid #1d6fff;
  outline-offset: 2px;
}

.cc-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}

@media (max-width: 480px) {
  .cc-modal {
    padding: 18px;
  }
  .cc-modal__actions .cc-btn {
    flex: 1 1 auto;
  }
}
