/* =============================================
   Legal Modal — Terms / Privacy / HIPAA
   ============================================= */

/* Backdrop */
.legal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(10, 18, 35, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: lm-fade-in 0.2s ease;
}
.legal-overlay.is-open {
  display: flex;
}

/* Dialog */
.legal-dialog {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
  animation: lm-slide-up 0.25s cubic-bezier(.22,.68,0,1.2);
  overflow: hidden;
}

/* Header */
.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid #e5e7eb;
  background: #f7f8fa;
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
}

/* Tab list */
.legal-tabs {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}
.legal-tab-btn {
  background: none;
  border: none;
  cursor: pointer;
  font: 500 0.875rem/1 inherit;
  color: #57606a;
  padding: 18px 16px;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.legal-tab-btn:hover {
  color: #1f2328;
}
.legal-tab-btn.is-active {
  color: #ff6b1a;
  border-bottom-color: #ff6b1a;
  font-weight: 600;
}

/* Close button */
.legal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #57606a;
  font-size: 1.5rem;
  line-height: 1;
  padding: 8px;
  margin-left: 12px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.legal-close:hover {
  background: #f0f1f3;
  color: #1f2328;
}

/* Body / scroll area */
.legal-body {
  overflow-y: auto;
  padding: 32px 32px 40px;
  flex: 1;
}

/* Pane visibility */
.legal-pane {
  display: none;
}
.legal-pane.is-active {
  display: block;
}

/* Content typography */
.legal-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 20px;
  color: #1f2328;
}
.legal-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 28px 0 10px;
  color: #1f2328;
}
.legal-body p,
.legal-body li {
  font-size: 0.9rem;
  line-height: 1.75;
  color: #444d56;
  margin-bottom: 12px;
}
.legal-body ul {
  padding-left: 20px;
  margin-bottom: 12px;
}
.legal-body u {
  display: inline-block;
  margin: 16px 0 6px;
  font-weight: 600;
  color: #1f2328;
  text-decoration: none;
  font-size: 0.9rem;
}
.legal-body strong {
  color: #1f2328;
}

/* Scrollbar */
.legal-body::-webkit-scrollbar { width: 6px; }
.legal-body::-webkit-scrollbar-track { background: transparent; }
.legal-body::-webkit-scrollbar-thumb { background: #d0d7de; border-radius: 3px; }

/* Animations */
@keyframes lm-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes lm-slide-up {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile */
@media (max-width: 600px) {
  .legal-header { padding: 0 12px; }
  .legal-tab-btn { padding: 16px 10px; font-size: 0.8rem; }
  .legal-body { padding: 20px 16px 32px; }
  .legal-dialog { border-radius: 12px; max-height: 92vh; }
}

/* Footer-bottom trigger links — keep inline, prevent wrapping */
.footer-bottom span:last-child {
  white-space: nowrap;
}
/* Override .footer a { display: block } from styles.css */
.footer .footer-bottom a[data-legal] {
  display: inline;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  margin: 0;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.footer .footer-bottom a[data-legal]:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Footer nav column trigger links */
.footer-grid a[data-legal] {
  /* inherits existing footer nav styles */
}

