/* =============================================
   uptime-calc.css — SLA/Uptime Calculator styles
   ============================================= */

.uptime-form { margin-top: 20px; }
.uptime-form .form-row { display: flex; gap: 8px; align-items: stretch; }
.uptime-input-wrap { flex: 1; position: relative; }
.uptime-input-wrap .input { padding-right: 36px; }
.uptime-input-pct {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 14px; color: var(--muted); pointer-events: none;
}

.uptime-presets {
  margin-top: 12px; font-size: 13px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.uptime-preset {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); border-radius: 6px; padding: 3px 10px;
  font-size: 12px; cursor: pointer; font-family: monospace;
  transition: background .15s;
}
.uptime-preset:hover { background: var(--surface3); }

/* Result wrapper */
.uptime-result { display: flex; flex-direction: column; gap: 16px; max-width: 780px; margin: 0 auto; }

/* Header */
.uptime-result-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.uptime-sla-title { font-size: 20px; font-weight: 700; margin: 0; }

/* Table */
.uptime-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.uptime-table th {
  padding: 9px 14px; text-align: left; color: var(--muted);
  font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--border);
}
.uptime-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.uptime-table tr:last-child td { border-bottom: none; }
.uptime-td-short { font-family: monospace; font-size: 13px; font-weight: 600; color: var(--text); }
.uptime-td-hms { font-size: 12px; color: var(--muted); }

/* SLA badges — colour-coded by tier */
.uptime-sla-badge {
  display: inline-block; padding: 3px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.uptime-sla-badge--five       { background: rgba(74,222,128,.15);  color: #4ade80; }
.uptime-sla-badge--four       { background: rgba(34,197,94,.15);   color: #22c55e; }
.uptime-sla-badge--three-half { background: rgba(234,179,8,.15);   color: #eab308; }
.uptime-sla-badge--three      { background: rgba(251,146,60,.15);  color: #fb923c; }
.uptime-sla-badge--two-half   { background: rgba(249,115,22,.15);  color: #f97316; }
.uptime-sla-badge--two        { background: rgba(239,68,68,.15);   color: #ef4444; }
.uptime-sla-badge--custom     { background: var(--surface2);       color: var(--muted); }

/* SLA comparison grid */
.uptime-sla-grid { display: flex; flex-direction: column; gap: 0; }
.uptime-sla-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.uptime-sla-row:last-child { border-bottom: none; }
.uptime-sla-row--active { background: rgba(var(--accent-rgb, 96,165,250),.06); border-radius: 6px; padding: 10px 8px; }
.uptime-sla-label { flex: 1; font-size: 13px; color: var(--text); min-width: 200px; }
.uptime-sla-pct { flex-shrink: 0; }
.uptime-sla-down { font-size: 12px; color: var(--muted); font-family: monospace; min-width: 140px; text-align: right; }

/* Error */
.uptime-error .card { border-color: var(--danger, #ef4444); }

@media (max-width: 600px) {
  .uptime-form .form-row { flex-direction: column; }
  .uptime-sla-title { font-size: 16px; }
  .uptime-table th, .uptime-table td { padding: 8px 10px; }
  .uptime-sla-label { min-width: 140px; font-size: 12px; }
  .uptime-sla-down { min-width: 100px; }
}
