/* ── Hypha Cookie Consent Banner & Modal ── */

#hypha-consent-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: #1A1033;
  border-top: 1px solid rgba(104,0,204,0.3);
  padding: 1.25rem 5%;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}

#hypha-consent-banner.hcb-visible {
  transform: translateY(0);
}

.hcb-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.hcb-text {
  flex: 1;
  min-width: 260px;
}

.hcb-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.3rem;
  font-family: 'Inter', sans-serif;
}

.hcb-text p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.6;
  margin: 0;
  font-family: 'Inter', sans-serif;
}

.hcb-text a {
  color: #C080FF;
  text-decoration: underline;
}

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

.hcb-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.15s;
  white-space: nowrap;
}

.hcb-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.hcb-btn:focus-visible { outline: 2px solid #6800CC; outline-offset: 2px; }

.hcb-btn--primary {
  background: #6800CC;
  color: #ffffff;
}

.hcb-btn--ghost {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.15);
}

/* ── Preferences Modal ── */

#hypha-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s;
}

#hypha-consent-modal.hcm-visible {
  opacity: 1;
}

.hcm-inner {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  font-family: 'Inter', sans-serif;
}

.hcm-inner h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #120A24;
  margin-bottom: 0.5rem;
}

.hcm-inner > p {
  font-size: 0.85rem;
  color: #6B6080;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.hcm-category {
  border: 1px solid rgba(104,0,204,0.1);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #F5F4FA;
}

.hcm-category label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: #120A24;
  cursor: pointer;
}

.hcm-category label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #6800CC;
  flex-shrink: 0;
}

.hcm-desc {
  font-size: 0.78rem;
  color: #6B6080;
  line-height: 1.55;
  margin: 0.4rem 0 0 1.6rem;
}

.hcm-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hcm-footer {
  font-size: 0.75rem;
  color: #6B6080;
  margin-top: 1rem;
  text-align: center;
}

.hcm-footer a {
  color: #6800CC;
  text-decoration: underline;
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  #hypha-consent-banner,
  #hypha-consent-modal { transition: none; }
}

@media (max-width: 600px) {
  .hcb-inner { flex-direction: column; align-items: flex-start; }
  .hcb-actions { width: 100%; }
  .hcb-btn { flex: 1; text-align: center; }
}
