/* Cookie consent banner — works with static/cookies.js */
.cc-banner {
  position: fixed;
  z-index: 10000;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 18px 16px;
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-sans, system-ui, sans-serif);
}
.cc-banner[hidden] { display: none !important; }
.cc-banner h2 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text-strong);
}
.cc-banner p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}
.cc-banner a { color: var(--link); font-weight: 600; text-underline-offset: 3px; }
.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cc-actions button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  color: var(--text);
}
.cc-actions .cc-accept {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: var(--btn-primary-shadow);
}
.cc-actions .cc-accept:hover { background: var(--btn-primary-hover); }
.cc-actions .cc-reject { background: var(--ghost-hover); color: var(--text); }
.cc-actions .cc-reject:hover { color: var(--text-strong); }
.cc-actions .cc-prefs {
  margin-left: auto;
  background: transparent;
  border: none;
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
  padding: 0 4px;
}
.cc-actions .cc-prefs:hover { color: var(--text-strong); text-decoration: underline; text-underline-offset: 3px; }
.cc-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: none;
}
.cc-banner.is-prefs .cc-panel { display: block; }
.cc-cat {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text);
}
.cc-cat strong { display: block; font-size: 13px; color: var(--text-strong); margin-bottom: 2px; }
.cc-cat input { margin-top: 3px; flex-shrink: 0; }
.cc-cat input:disabled { opacity: .7; }
@media (max-width: 560px) {
  .cc-banner {
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom, 0px));
    max-width: none;
    padding: 12px 12px 10px;
    max-height: min(52vh, 320px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cc-banner h2 { margin-bottom: 4px; font-size: 14px; }
  .cc-banner p {
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
  }
  .cc-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .cc-actions button {
    min-height: 44px;
    width: 100%;
    justify-content: center;
    padding: 8px 10px;
  }
  .cc-actions .cc-prefs {
    margin-left: 0;
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
    padding: 6px 4px;
    min-height: 36px;
  }
  .cc-banner.is-prefs .cc-actions:first-of-type {
    display: none;
  }
  .cc-banner.is-prefs p {
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
  }
  .cc-banner.is-prefs {
    max-height: min(78vh, 520px);
  }
}
