/* ===============================
   SARANOR — DEMO UI (SCOPED)
   =============================== */

/* Do NOT style body/section globally here.
   Keep everything scoped to .demo-section and children to avoid overriding site layout. */

.demo-section {
  background: linear-gradient(
    to right,
    rgba(26, 79, 255, 0.06),
    #f5f8ff 18%,
    #f5f8ff 100%
  );
  padding: 90px 0;
  position: relative;
  max-width: 100%;
  margin: 0;
}

.demo-section .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.demo-header {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
}

.demo-header-center {
  text-align: center;
}

.demo-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 34px;
  border: 1px solid #e1e6f0;
  box-shadow:
    0 24px 48px rgba(26, 79, 255, 0.08),
    0 6px 16px rgba(0, 0, 0, 0.04);
  position: relative;
}

.demo-box {
  background: #f9fbff;
  border: 1px solid #dde3ef;
  border-radius: 12px;
  padding: 18px;
}

.demo-frame-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 12px 14px;
  border-bottom: 1px solid #e7edf8;
  margin-bottom: 14px;
}

.demo-frame-title {
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: #334155;
}

.demo-frame-meta {
  font-size: 12px;
  color: #64748b;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 2px;
  margin-bottom: 16px;
}

.msg {
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.msg.user {
  align-self: flex-end;
  max-width: 80%;
  background: #eef3ff;
  border-radius: 10px 10px 2px 10px;
}

.msg.ai {
  align-self: flex-start;
  max-width: 85%;
  background: #ffffff;
  border: 1px solid #e1e6f0;
  border-radius: 10px 10px 10px 2px;
}

.msg.status {
  align-self: flex-start;
  max-width: 85%;
  background: transparent;
  border: none;
  color: #64748b;
  padding: 6px 2px;
  font-size: 13px;
}

.demo-input {
  display: flex;
  gap: 12px;
  align-items: center;
}

.demo-input input {
  flex: 1;
  height: 52px;
  border-radius: 10px;
  border: 1px solid #d7dce3;
  padding: 0 16px;
  font-size: 15px;
  background: #fff;
}

#sendBtn {
  background: #1a4fff;
  color: #ffffff;
  border: none;
  padding: 0 22px;
  height: 52px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(26, 79, 255, 0.25);
  white-space: nowrap;
}

#sendBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

#sendBtn:hover {
  background: #1746e0;
}

.demo-footnote {
  margin-top: 12px;
  font-size: 13px;
  color: #64748b;
}

.demo-cta {
  text-align: center;
  margin-top: 28px;
}


/* Production Preview v1 refinements */
.demo-kicker {
  color: #1a4fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.demo-frame-subtitle {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
  letter-spacing: normal;
  font-weight: 400;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.preset-question {
  border: 1px solid #d7dce8;
  background: #ffffff;
  color: #334155;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}

.preset-question:hover {
  border-color: #1a4fff;
  color: #1a4fff;
}

.demo-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin: 8px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#contactCenterInput {
  width: 100%;
  min-height: 110px;
  border-radius: 12px;
  border: 1px solid #d7dce8;
  background: #ffffff;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

#contactCenterSendBtn {
  min-width: 180px;
  height: 52px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
}

.demo-status {
  font-size: 14px;
  color: #475569;
}

.demo-status-error {
  color: #b42318;
}

.response-panel {
  margin-top: 18px;
}

.loading-box,
.error-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #e1e6f0;
  border-radius: 14px;
  padding: 16px;
  color: #334155;
}

.error-box {
  display: block;
  border-color: #fecaca;
  background: #fff7f7;
}

.loading-box p,
.error-box p {
  margin: 6px 0 0;
  color: #64748b;
}

.loading-dot {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 999px;
  background: #1a4fff;
  animation: saranorPulse 1s infinite ease-in-out;
}

@keyframes saranorPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.result-eyebrow {
  color: #1a4fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.result-header h3 {
  margin: 4px 0 0;
  color: #0f172a;
}

.result-badge {
  background: #eaf0ff;
  color: #1a4fff;
  border: 1px solid #cdd9ff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.result-card {
  background: #ffffff;
  border: 1px solid #e1e6f0;
  border-radius: 14px;
  padding: 16px;
}

.result-card-wide {
  grid-column: 1 / -1;
}

.result-card h4 {
  margin: 0 0 10px;
  color: #0f172a;
}

.result-card p {
  margin: 0;
  color: #334155;
  line-height: 1.6;
}

.result-card ul {
  margin: 0;
  padding-left: 18px;
  color: #334155;
  line-height: 1.6;
}

.raw-result {
  margin-top: 14px;
  background: #f8fafc;
  border: 1px solid #e1e6f0;
  border-radius: 12px;
  padding: 12px 14px;
}

.raw-result summary {
  cursor: pointer;
  font-weight: 700;
  color: #334155;
}

.raw-result pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 12px 0 0;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.trust-strip {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trust-strip span {
  background: #eef3ff;
  color: #334155;
  border: 1px solid #dbe5ff;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
}

@media (max-width: 760px) {
  .demo-card {
    padding: 18px;
  }

  .demo-frame-head,
  .demo-input,
  .result-header {
    flex-direction: column;
    align-items: stretch;
  }

  #contactCenterSendBtn {
    width: 100%;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }
}

/* Saranor demo v1.2 intelligence visuals */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.kpi-card {
  border: 1px solid var(--border, #d9e2ef);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
}
.kpi-card span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #63738a;
  margin-bottom: 6px;
}
.kpi-card strong {
  font-size: 1.15rem;
  color: #0b1f3a;
}
.risk-table {
  width: 100%;
  display: grid;
  gap: 8px;
}
.risk-row {
  display: grid;
  grid-template-columns: 1.2fr repeat(5, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f7;
  font-size: 0.92rem;
}
.risk-head {
  font-weight: 700;
  color: #52637a;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}
.risk-bar {
  height: 7px;
  background: #edf2ff;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}
.risk-bar i {
  display: block;
  height: 100%;
  background: #2454ff;
  border-radius: inherit;
}
.mini-chart {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 150px;
  padding-top: 16px;
}
.mini-bar {
  flex: 1;
  height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  gap: 6px;
}
.mini-bar i {
  width: 100%;
  min-height: 8px;
  background: #2454ff;
  border-radius: 8px 8px 2px 2px;
  opacity: 0.82;
}
.mini-bar span {
  font-size: 0.72rem;
  color: #63738a;
}
@media (max-width: 800px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .risk-row { grid-template-columns: 1fr 1fr; }
  .risk-head { display: none; }
}


/* Saranor Demo Platform v2 enterprise visuals */
.kpi-row-v2 { grid-template-columns: repeat(6, minmax(120px, 1fr)); }
.health-panel { display: grid; grid-template-columns: 1.2fr 1fr 1fr; align-items: center; gap: 18px; background: linear-gradient(135deg, #ffffff, #f6f9ff); }
.gauge-wrap { display: grid; gap: 8px; }
.gauge { height: 14px; border-radius: 999px; background: #e8eefc; overflow: hidden; }
.gauge i { display:block; height:100%; border-radius:inherit; background:#1a4fff; }
.health-pills { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.health-pills span, .severity-badge { border-radius:999px; padding:7px 10px; font-size:12px; font-weight:700; border:1px solid #dbe5ff; background:#eef3ff; color:#334155; }
.severity-stable { background:#ecfdf3 !important; color:#027a48 !important; border-color:#abefc6 !important; }
.severity-medium { background:#fffaeb !important; color:#b54708 !important; border-color:#fedf89 !important; }
.severity-high { background:#fff1f3 !important; color:#c01048 !important; border-color:#fecdd6 !important; }
.severity-critical { background:#fef3f2 !important; color:#b42318 !important; border-color:#fecdca !important; }
.anomaly-list { display:grid; gap:12px; }
.anomaly-item { display:flex; gap:10px; align-items:flex-start; padding:10px; border:1px solid #edf1f7; border-radius:12px; background:#fbfdff; }
.anomaly-item p { margin:4px 0 0; color:#64748b; font-size:13px; }
.priority-callout { margin-top:12px; padding:12px; background:#eef3ff; border:1px solid #dbe5ff; border-radius:12px; color:#334155; line-height:1.5; }
.line-chart { height:180px; border:1px solid #e1e6f0; border-radius:14px; background:linear-gradient(180deg,#ffffff,#f8fbff); padding:14px; }
.line-chart svg { width:100%; height:100%; overflow:visible; }
.line-chart polyline { fill:none; stroke:#1a4fff; stroke-width:3; vector-effect: non-scaling-stroke; stroke-linecap:round; stroke-linejoin:round; }
.trend-labels { display:flex; justify-content:space-between; margin-top:8px; color:#64748b; font-size:12px; }
@media (max-width: 900px) { .kpi-row-v2 { grid-template-columns: repeat(2, 1fr); } .health-panel { grid-template-columns:1fr; } .health-pills { justify-content:flex-start; } }
