/* ============================================================
   Just Pitch — Engagement insights modal + status dropdown menu
   ============================================================ */

/* ============== Status menu (replaces status pill) ============== */
.status-menu { position: relative; margin-right: 4px; }
.status-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast);
  font-family: inherit;
}
.status-menu-btn:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.3);
}
.status-menu-btn .status-dot {
  width: 8px; height: 8px;
  border-radius: 99px;
  background: var(--jr-blue-300);
  flex-shrink: 0;
}
.status-menu-btn.s-draft .status-dot     { background: #9DA8B3; }
.status-menu-btn.s-sent .status-dot      { background: var(--jr-blue-300); }
.status-menu-btn.s-viewed .status-dot    { background: #E0A23C; }
.status-menu-btn.s-accepted .status-dot  { background: #4BB57E; }
.status-menu-btn.s-declined .status-dot  { background: #D86A60; }
.status-menu-btn.s-archived .status-dot  { background: #5A6573; }

.status-menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 250;
  background: #fff;
  border: 1px solid var(--jr-gray-200);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(15,40,80,0.22);
  min-width: 260px;
  padding: 6px;
  font-family: var(--font-sans);
  color: var(--jr-gray-800);
}
.status-menu-section {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--jr-gray-500);
  font-weight: 700;
  padding: 8px 10px 4px;
}
.status-menu-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: background var(--dur-fast);
}
.status-menu-item:hover:not(:disabled) { background: var(--jr-gray-50); }
.status-menu-item:disabled { opacity: .35; cursor: not-allowed; }
.status-menu-item.is-active { background: rgba(34, 90, 133, 0.06); }
.status-menu-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  margin-top: 4px;
  flex-shrink: 0;
}
.status-menu-item.s-accepted .dot { background: #4BB57E; }
.status-menu-item.s-declined .dot { background: #D86A60; }
.status-menu-item.s-archived .dot { background: #5A6573; }
.status-menu-item.s-draft .dot    { background: #9DA8B3; }
.status-menu-item .lbl {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--jr-blue-900);
  margin-bottom: 1px;
}
.status-menu-item .hint {
  font-size: 11.5px;
  color: var(--jr-gray-600);
  line-height: 1.3;
}
.status-menu-divider {
  height: 1px;
  background: var(--jr-gray-200);
  margin: 4px 6px;
}

/* ============== Insights modal ============== */
.insights-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 40, 80, 0.55);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 220;
  font-family: var(--font-sans);
}
.im-body {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 72px rgba(8,30,60,.4);
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.im-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--jr-gray-200);
  background: linear-gradient(180deg, #FAFCFE 0%, #fff 100%);
}
.im-eyebrow {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--jr-gray-500);
  margin-bottom: 4px;
}
.im-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  margin: 0 0 4px;
  letter-spacing: -.01em;
  color: var(--jr-blue-900);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.im-status {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--jr-blue-50, #E7EFF7);
  color: var(--jr-blue-700, #225A85);
  padding: 3px 8px;
  border-radius: 99px;
}
.im-sub {
  font-size: 13px;
  color: var(--jr-gray-600);
  line-height: 1.4;
}
.im-close {
  background: transparent;
  border: none;
  color: var(--jr-gray-500);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.im-close:hover { background: var(--jr-gray-100); color: var(--jr-blue-900); }

.im-content {
  padding: 22px 28px 24px;
  overflow-y: auto;
}

/* KPI tiles */
.im-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.im-kpi {
  background: var(--jr-gray-50);
  border: 1px solid var(--jr-gray-200);
  border-radius: 10px;
  padding: 14px 16px;
}
.im-kpi-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -.01em;
  color: var(--jr-blue-900);
  line-height: 1.1;
}
.im-kpi-label {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--jr-gray-600);
  font-weight: 600;
  margin-top: 6px;
}

.im-section { margin-top: 8px; }
.im-section + .im-section { margin-top: 22px; }
.im-section-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--jr-blue-900);
  margin: 0 0 12px;
}

/* Section dwell bars */
.im-bars { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.im-bars li { display: flex; flex-direction: column; gap: 4px; }
.im-bar-row { display: flex; justify-content: space-between; align-items: baseline; }
.im-bar-label { font-size: 13.5px; color: var(--jr-blue-900); font-weight: 600; }
.im-bar-val   { font-size: 12.5px; color: var(--jr-gray-600); font-variant-numeric: tabular-nums; }
.im-bar-track {
  height: 7px;
  background: var(--jr-gray-100);
  border-radius: 99px;
  overflow: hidden;
}
.im-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--jr-blue-300) 0%, var(--jr-blue-700) 100%);
  border-radius: 99px;
  transition: width .35s var(--ease-out);
}

/* Sessions list */
.im-sessions { list-style: none; padding: 0; margin: 0; }
.im-sessions li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--jr-gray-200);
}
.im-sessions li:last-child { border-bottom: none; }
.im-sess-when strong {
  display: block;
  font-size: 13.5px;
  color: var(--jr-blue-900);
  margin-bottom: 2px;
}
.im-sess-when .im-sub { font-size: 11.5px; }
.im-sess-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--jr-gray-600);
}
.im-pill {
  background: rgba(34, 90, 133, 0.08);
  color: var(--jr-blue-700, #225A85);
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Empty / error / loading states */
.im-empty {
  padding: 60px 32px;
  text-align: center;
  color: var(--jr-gray-600);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.im-empty strong {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--jr-blue-900);
  font-weight: 800;
}
.im-empty-icon { color: var(--jr-gray-400); margin-bottom: 8px; }
.im-hint {
  margin-top: 14px;
  font-size: 12px;
  color: var(--jr-gray-500);
  max-width: 360px;
}
.im-spinner {
  width: 24px; height: 24px;
  border: 2.5px solid var(--jr-gray-200);
  border-top-color: var(--jr-blue);
  border-radius: 50%;
  animation: im-spin .8s linear infinite;
  margin-bottom: 12px;
}
@keyframes im-spin { to { transform: rotate(360deg); } }

.im-foot {
  padding: 14px 24px;
  border-top: 1px solid var(--jr-gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--jr-gray-50);
}
.im-btn-ghost {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--jr-gray-300);
  color: var(--jr-gray-700);
  cursor: pointer;
  transition: background var(--dur-fast);
}
.im-btn-ghost:hover { background: var(--jr-gray-100); }

/* Responsive */
@media (max-width: 600px) {
  .im-kpis { grid-template-columns: 1fr 1fr; }
}
