/* FILE_LOCATION= ellipse://demos/go/quakecat/quakecat_railway/static/style.css */

/* QuakeCat Railway — dark sidebar two-column layout */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  font-size: 14px;
}

body {
  display: flex;
  flex-direction: row;
  height: 100vh;
  background-color: #0b1220;
  color: #e5e7eb;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

#sidebar {
  width: 320px;
  min-width: 280px;
  max-width: 380px;
  height: 100vh;
  background-color: #0b1220;
  color: #e5e7eb;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #1e2d45;
  flex-shrink: 0;
  padding: 0;
}

.sidebar-header {
  background-color: #0d1a2e;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #1e2d45;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-header h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #f0f4ff;
  letter-spacing: 0.02em;
}

.tutorial-link {
  color: #7eb8f7;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 4px 10px;
  border: 1px solid #2a4a7f;
  border-radius: 4px;
  transition: background-color 0.15s;
}

.tutorial-link:hover {
  background-color: #1a3055;
  color: #a8d0ff;
}

/* ── Sections ────────────────────────────────────────────────────────────── */

#recent-section,
#analysis-section {
  padding: 16px 20px;
  border-bottom: 1px solid #1e2d45;
}

#recent-section h2,
#analysis-section h2 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Summary panel ───────────────────────────────────────────────────────── */

#summary-panel {
  padding: 16px 20px;
  flex: 1;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.6;
}

#summary-panel h3 {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.placeholder-text {
  color: #4a5568;
  font-style: italic;
  margin: 0;
}

/* ── Controls ────────────────────────────────────────────────────────────── */

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.control-row label {
  color: #94a3b8;
  font-size: 0.85rem;
  flex-shrink: 0;
  min-width: 100px;
}

.control-row select,
.control-row input[type="number"] {
  flex: 1;
  background-color: #0d1a2e;
  color: #e5e7eb;
  border: 1px solid #2a4a7f;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.control-row select:focus,
.control-row input[type="number"]:focus {
  border-color: #4a7fc1;
}

.checkbox-row {
  justify-content: flex-start;
  gap: 12px;
}

.checkbox-row label {
  min-width: auto;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #e05070;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

button,
.btn-primary {
  cursor: pointer;
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background-color 0.15s, transform 0.1s;
  width: 100%;
  margin-top: 8px;
}

.btn-primary {
  background-color: #e05070;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #c8405e;
}

.btn-primary:active {
  transform: scale(0.98);
}

/* ── Status line ─────────────────────────────────────────────────────────── */

.status-line {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #64748b;
  min-height: 1.2em;
}

/* ── Summary table ───────────────────────────────────────────────────────── */

.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.summary-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #1e2d45;
  vertical-align: top;
}

.summary-table td:first-child {
  color: #94a3b8;
  font-size: 0.8rem;
  white-space: nowrap;
  padding-right: 12px;
  width: 45%;
}

.summary-table td:last-child {
  color: #e5e7eb;
  font-size: 0.85rem;
  font-weight: 500;
}

.mfd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  margin-top: 6px;
}

.mfd-table th {
  color: #64748b;
  text-align: right;
  padding: 3px 6px;
  border-bottom: 1px solid #1e2d45;
  font-weight: 500;
}

.mfd-table th:first-child {
  text-align: left;
}

.mfd-table td {
  padding: 2px 6px;
  text-align: right;
  border-bottom: 1px solid #111827;
  color: #cbd5e1;
}

.mfd-table td:first-child {
  text-align: left;
  color: #94a3b8;
}

.error-panel {
  background-color: #2d1a1a;
  border: 1px solid #7f2a2a;
  border-radius: 5px;
  padding: 12px;
  color: #f87171;
  font-size: 0.85rem;
}

.error-panel strong {
  display: block;
  margin-bottom: 4px;
}

/* ── Map ─────────────────────────────────────────────────────────────────── */

#map {
  flex: 1;
  height: 100vh;
  width: 100%;
  background-color: #1a2332;
}

/* ── Scrollbar styling ───────────────────────────────────────────────────── */

#sidebar::-webkit-scrollbar,
#summary-panel::-webkit-scrollbar {
  width: 5px;
}

#sidebar::-webkit-scrollbar-track,
#summary-panel::-webkit-scrollbar-track {
  background: #0b1220;
}

#sidebar::-webkit-scrollbar-thumb,
#summary-panel::-webkit-scrollbar-thumb {
  background: #2a4a7f;
  border-radius: 3px;
}

/* ── Loading spinner ─────────────────────────────────────────────────────── */

.loading-text {
  color: #4a7fc1;
  font-style: italic;
  font-size: 0.85rem;
}
