/* ===== Demo Pages Shared Styles ===== */

/* Hero */
.demo-hero {
  padding: 9rem 0 3rem;
  background: linear-gradient(175deg, #0f172a 0%, #1e293b 100%);
  color: #f1f5f9;
}
.demo-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: .5rem; }
.demo-hero .demo-tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: .3rem .9rem; border-radius: 10px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 1rem; }
.demo-hero p { font-size: 1.05rem; color: #94a3b8; max-width: 600px; margin: 0 auto; }
.tag-blue { background: rgba(59,130,246,.15); color: #60a5fa; }
.tag-orange { background: rgba(249,115,22,.15); color: #fb923c; }
.tag-green { background: rgba(16,185,129,.15); color: #34d399; }
.tag-yellow { background: rgba(234,179,8,.15); color: #facc15; }

/* Data Source Toggle */
.demo-source { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.demo-source .btn { min-width: 200px; }

/* Privacy Notice */
.demo-privacy {
  text-align: center; font-size: .8rem; color: #64748b; margin-bottom: 2rem;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
}
.demo-privacy svg { flex-shrink: 0; }

/* Input Preview Table */
.demo-table-wrap {
  overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 12px;
  background: #fff; margin-bottom: 2rem;
}
.demo-table {
  width: 100%; border-collapse: collapse; font-size: .85rem; white-space: nowrap;
}
.demo-table th {
  background: #f8fafc; font-weight: 600; color: #334155; text-align: left;
  padding: .75rem 1rem; border-bottom: 2px solid #e2e8f0; position: sticky; top: 0;
}
.demo-table td {
  padding: .6rem 1rem; border-bottom: 1px solid #f1f5f9; color: #475569;
}
.demo-table tr:nth-child(even) td { background: #fafafa; }
.demo-table tr:hover td { background: #f0fdfa; }

/* Processing Animation */
.demo-processing {
  text-align: center; padding: 3rem 0; display: none;
}
.demo-processing.active { display: block; }
.demo-processing h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; color: #1a1a2e; }
.demo-progress-bar {
  width: 100%; max-width: 400px; height: 6px; background: #e2e8f0;
  border-radius: 3px; margin: 0 auto; overflow: hidden;
}
.demo-progress-fill {
  height: 100%; width: 0; background: #0d9488; border-radius: 3px;
  transition: width .1s linear;
}
.demo-processing .demo-step {
  font-size: .85rem; color: #64748b; margin-top: .75rem; min-height: 1.2em;
}

/* Results Dashboard */
.demo-results { display: none; }
.demo-results.active { display: block; }

.demo-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.demo-summary-card {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 1.25rem; text-align: center;
}
.demo-summary-num { font-size: 1.8rem; font-weight: 800; color: #0d9488; display: block; }
.demo-summary-label { font-size: .8rem; color: #64748b; margin-top: .25rem; display: block; }
.demo-summary-card.alert .demo-summary-num { color: #ef4444; }
.demo-summary-card.warn .demo-summary-num { color: #f59e0b; }

/* Severity Badges */
.badge-high { display: inline-block; font-size: .7rem; font-weight: 700; padding: .2rem .6rem; border-radius: 6px; background: #fef2f2; color: #dc2626; text-transform: uppercase; }
.badge-medium { display: inline-block; font-size: .7rem; font-weight: 700; padding: .2rem .6rem; border-radius: 6px; background: #fffbeb; color: #d97706; text-transform: uppercase; }
.badge-low { display: inline-block; font-size: .7rem; font-weight: 700; padding: .2rem .6rem; border-radius: 6px; background: #f0fdf4; color: #16a34a; text-transform: uppercase; }
.badge-match { display: inline-block; font-size: .7rem; font-weight: 700; padding: .2rem .6rem; border-radius: 6px; background: #f0fdfa; color: #0d9488; text-transform: uppercase; }

/* Results CTA */
.demo-result-cta {
  text-align: center; padding: 2.5rem 0 1rem;
}
.demo-result-cta p { font-size: 1rem; color: #475569; margin-bottom: 1rem; }

/* Email Gate Modal */
.demo-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(15,23,42,.6); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.demo-modal-overlay.active { display: flex; }
.demo-modal {
  background: #fff; border-radius: 16px; padding: 2.5rem;
  max-width: 440px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.demo-modal h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: .5rem; }
.demo-modal > p { font-size: .9rem; color: #64748b; margin-bottom: 1.5rem; }
.demo-modal form { display: flex; flex-direction: column; gap: .75rem; }
.demo-modal input {
  padding: .8rem 1rem; font-family: inherit; font-size: .95rem;
  border: 1px solid #e2e8f0; border-radius: 8px; transition: border-color .2s;
}
.demo-modal input:focus { outline: none; border-color: #0d9488; }
.demo-modal .btn { margin-top: .5rem; }
.demo-modal-close {
  position: absolute; top: 1rem; right: 1rem; background: none; border: none;
  font-size: 1.5rem; color: #94a3b8; cursor: pointer; line-height: 1;
}

/* Hub Page Demo Cards */
.demo-card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem; margin-top: 2.5rem;
}
.demo-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
  padding: 2rem; text-align: center; transition: all .2s;
}
.demo-card:hover { border-color: #0d9488; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.demo-card-icon {
  width: 56px; height: 56px; border-radius: 14px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 1.5rem;
  margin-bottom: 1rem;
}
.demo-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.demo-card p { font-size: .88rem; color: #64748b; line-height: 1.6; margin-bottom: 1.25rem; }
.demo-card .demo-link { font-size: .9rem; font-weight: 600; color: #0d9488; text-decoration: none; }
.demo-card .demo-link:hover { text-decoration: underline; }

/* Back link */
.demo-back { display: inline-block; font-size: .85rem; color: #64748b; margin-bottom: 1.5rem; }
.demo-back:hover { color: #0d9488; }

/* Mobile */
@media (max-width: 768px) {
  .demo-hero { padding: 7rem 0 2rem; }
  .demo-hero h1 { font-size: 1.8rem; }
  .demo-source { flex-direction: column; align-items: center; }
  .demo-source .btn { width: 100%; max-width: 300px; }
  .demo-summary { grid-template-columns: repeat(2, 1fr); }
  .demo-card-grid { grid-template-columns: 1fr; }
}
