/* css/jobsim.css - Lighter, inviting UI for Apex JobSIM */
:root {
  --js-bg: #f3f4ff;
  --js-panel: #ffffff;
  --js-panel-soft: #f5f7ff;
  --js-border: #d1d5f0;
  --js-accent: #f5c354;
  --js-accent-soft: rgba(245, 195, 84, 0.15);
  --js-text: #0f172a;
  --js-muted: #6b7280;
  --js-danger: #ef4444;
  --js-radius-lg: 22px;
  --js-radius-md: 14px;
  --js-radius-sm: 9px;
  --js-shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --js-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, #e0f2fe 0, transparent 52%),
    radial-gradient(circle at top right, #fef3c7 0, transparent 52%),
    linear-gradient(to bottom, #eef2ff, #e5e7eb);
  color: var(--js-text);
  font-family: var(--js-font);
}

.js-page {
  min-height: 100vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 14px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Header */

.js-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background:
    radial-gradient(circle at top left, rgba(248, 250, 252, 0.95) 0, rgba(239, 246, 255, 0.96) 45%, rgba(224, 231, 255, 0.98) 100%);
  border-radius: 999px;
  padding: 10px 18px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  box-shadow: var(--js-shadow-soft);
  gap: 16px;
}

.js-logo-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.js-logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle at 25% 15%, #fef9c3 0, #facc15 40%, #f59e0b 70%, #b45309 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.6), 0 18px 32px rgba(245, 158, 11, 0.5);
}

.js-logo-title {
  font-weight: 700;
  font-size: 1.06rem;
}

.js-logo-sub {
  font-size: 0.8rem;
  color: var(--js-muted);
}

.js-header-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.js-select-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.78rem;
  color: var(--js-muted);
}

.js-select-block select {
  min-width: 170px;
  padding: 6px 9px;
  border-radius: var(--js-radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: #ffffff;
  color: var(--js-text);
  font-size: 0.8rem;
}

/* Main layout */

.js-main {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.2fr);
  gap: 14px;
  flex: 1;
}

.js-interview-pane {
  background: var(--js-panel);
  border-radius: 26px;
  border: 1px solid rgba(199, 210, 254, 0.9);
  box-shadow: var(--js-shadow-soft);
  display: flex;
  flex-direction: column;
}

.js-interview-header {
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(209, 213, 219, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.js-interviewer-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.js-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #e0f2fe 0, #bfdbfe 40%, #93c5fd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4);
}

.js-interviewer-name {
  font-size: 0.96rem;
  font-weight: 600;
}

.js-interviewer-role {
  font-size: 0.8rem;
  color: var(--js-muted);
}

.js-interview-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.js-status-pill {
  font-size: 0.78rem;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: #f1f5f9;
  color: var(--js-muted);
}

.js-status-pill.js-status-live {
  border-color: rgba(34, 197, 94, 0.9);
  background: rgba(220, 252, 231, 0.9);
  color: #15803d;
}

.js-status-pill.js-status-ended {
  border-color: rgba(248, 113, 113, 0.95);
  background: rgba(254, 226, 226, 0.9);
  color: #b91c1c;
}

.js-timer {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid rgba(165, 180, 252, 0.9);
}

/* Transcript */

.js-transcript {
  flex: 1;
  padding: 12px 14px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: radial-gradient(circle at top, #f9fafb 0, #eff6ff 55%, #eef2ff 100%);
  border-bottom-left-radius: 26px;
  border-bottom-right-radius: 26px;
}

.js-transcript-empty {
  margin: auto;
  text-align: center;
  color: var(--js-muted);
  max-width: 360px;
  font-size: 0.9rem;
}

.js-bubble {
  max-width: 92%;
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.5;
  position: relative;
}

.js-bubble-label {
  font-size: 0.75rem;
  margin-bottom: 2px;
  opacity: 0.85;
}

.js-bubble-interviewer {
  align-self: flex-start;
  background: linear-gradient(145deg, #ffffff, #eff6ff);
  border: 1px solid rgba(191, 219, 254, 0.9);
}

.js-bubble-user {
  align-self: flex-end;
  background: linear-gradient(145deg, #ecfdf3, #dcfce7);
  border: 1px solid rgba(134, 239, 172, 0.9);
}

.js-bubble-question {
  font-weight: 500;
}

.js-bubble-meta {
  font-size: 0.7rem;
  color: var(--js-muted);
  margin-top: 3px;
}

/* Side pane */

.js-side-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.js-answer-box,
.js-help-box,
.js-summary-box {
  background: var(--js-panel);
  border-radius: var(--js-radius-lg);
  border: 1px solid rgba(209, 213, 219, 0.9);
  padding: 10px 12px;
  box-shadow: var(--js-shadow-soft);
}

.js-answer-box h2,
.js-help-box h2,
.js-summary-box h2 {
  font-size: 0.9rem;
  margin: 0 0 6px;
}

.js-small {
  font-size: 0.78rem;
  color: var(--js-muted);
  margin: 0 0 8px;
}

/* Mic */

.js-mic-shell {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.js-mic-btn {
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.9);
  padding: 7px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  background: radial-gradient(circle at top, #eef2ff 0, #e0f2fe 45%, #fef3c7 100%);
  color: #111827;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 30px rgba(148, 163, 184, 0.35);
}

.js-mic-btn[disabled] {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
}

.js-mic-btn.js-mic-active {
  border-color: rgba(59, 130, 246, 0.95);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.9), 0 16px 36px rgba(59, 130, 246, 0.5);
}

.js-mic-icon {
  font-size: 1.1rem;
}

.js-mic-label {
  font-size: 0.8rem;
  font-weight: 500;
}

/* Notes */

#js-notes-input {
  width: 100%;
  min-height: 110px;
  padding: 8px;
  border-radius: var(--js-radius-md);
  border: 1px solid rgba(209, 213, 219, 0.95);
  background: var(--js-panel-soft);
  color: var(--js-text);
  resize: vertical;
  font-size: 0.85rem;
  margin-top: 4px;
}

.js-notes-label {
  font-size: 0.78rem;
  color: var(--js-muted);
}

/* AI help */

.js-ai-help {
  font-size: 0.8rem;
  color: var(--js-muted);
}

/* Summary */

.js-summary-score {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.js-summary-rating {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.js-summary-tips {
  padding-left: 18px;
  margin: 0;
  font-size: 0.8rem;
  color: var(--js-muted);
}

/* Buttons */

.js-btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
  color: var(--js-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.js-btn-primary {
  background: radial-gradient(circle at top, #fef9c3 0, #facc15 42%, #f59e0b 74%, #b45309 100%);
  color: #111827;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.75), 0 14px 32px rgba(245, 158, 11, 0.7);
}

.js-btn-danger {
  background: linear-gradient(135deg, #fecaca, #ef4444);
  color: #7f1d1d;
}

.js-btn-ghost {
  background: #f3f4ff;
  border-color: rgba(148, 163, 184, 0.9);
  color: var(--js-muted);
}

.js-btn:disabled {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}

/* Footer */

.js-footer {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--js-muted);
  padding-top: 2px;
}

.js-dot {
  opacity: 0.6;
}

/* Responsive */

@media (max-width: 900px) {
  .js-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .js-header {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 24px;
  }

  .js-header-controls {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .js-interview-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .js-interview-status {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
