/* =====================================================================
 * HOS Risk Monitor Starter — Styles
 * ---------------------------------------------------------------------
 * Every selector starts with `.hosmon-` or `#hosmon-` to avoid
 * collisions with MyGeotab's own CSS that exists in the parent page.
 *
 * Color palette chosen to match the user's existing Chrome extension:
 *   - Deep slate background gradient (#0F172A → #1E293B)
 *   - Indigo/violet primary (#3B82F6 → #8B5CF6)
 *   - Success green #22C55E, warning amber #F59E0B, critical red #EF4444
 * ===================================================================== */

/* Reset only inside our root — don't touch global anything. */
#hosmon-root,
#hosmon-root * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#hosmon-root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: #E2E8F0;
  background: linear-gradient(145deg, #0F172A, #1E293B);
  min-height: 100vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ------------------------ Header ------------------------ */

.hosmon-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding-bottom: 16px;
}

.hosmon-header h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.4px;
  background: linear-gradient(135deg, #60A5FA, #C4B5FD);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.hosmon-header p {
  font-size: 13px;
  color: #94A3B8;
}

/* ------------------------ Sections ------------------------ */

.hosmon-section {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hosmon-section h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #64748B;
}

.hosmon-section p {
  font-size: 13px;
  color: #CBD5E1;
  line-height: 1.5;
}

/* ------------------------ Buttons ------------------------ */

.hosmon-btn {
  align-self: flex-start;
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.hosmon-btn:hover { opacity: 0.92; }
.hosmon-btn:active { transform: translateY(1px); }
.hosmon-btn:disabled {
  opacity: 0.5;
  cursor: wait;
  box-shadow: none;
}

/* ------------------------ Output blocks ------------------------ */

.hosmon-output {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #94A3B8;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow-y: auto;
}

/* ------------------------ Footer ------------------------ */

.hosmon-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #475569;
}

/* ------------------------ Responsive ------------------------ */

@media (max-width: 720px) {
  #hosmon-root { padding: 16px; gap: 14px; }
  .hosmon-section { padding: 14px; }
  .hosmon-header h1 { font-size: 18px; }
}
