/* BeamDial: styles that exist only in this tool. Shared look: ../../shared/css/style.css */

/* Page shell: a one-screen cockpit on desktop; stacked and scrolling below 1024px. */

html, body { min-height: 100%; }

.app-shell { min-height: 100vh; min-height: 100dvh; }

@media (min-width: 1024px) {
  html, body { height: 100%; overflow: hidden; }

  .app-shell { height: 100vh; height: 100dvh; }
}

/* Settings / My library switch (same as DiePack's IN / MM switch) */

.view-btn { color: #475569; }

.view-btn:hover { color: #0f172a; }

.view-btn.is-active { background: #4f46e5; color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }

/* Result: speed, power, passes and the rest as tiles */

.stack { display: flex; flex-direction: column; gap: 12px; }

.stack.hidden { display: none; }

.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }

.result-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; }

.result-tile--wide { grid-column: 1 / -1; }

.result-label { font-size: 8.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; }

.result-value { font-size: 20pt; font-weight: 700; line-height: 1.1; color: #3730a3; font-variant-numeric: tabular-nums; }

.result-note { font-size: 10pt; color: #334155; line-height: 1.4; }

/* Warnings (amber) and jobs that cannot be done (rose) */

.warn-box { border: 1px solid #fcd34d; background: #fffbeb; color: #78350f; border-radius: 12px; padding: 10px 12px; font-size: 9.5pt; line-height: 1.45; }

.warn-box.is-blocked { border-color: #fda4af; background: #fff1f2; color: #881337; }

.warn-box ul { margin: 4px 0 0; padding-left: 18px; list-style: disc; }

.warn-box li + li { margin-top: 3px; }

.tips-list { margin: 0; padding-left: 18px; list-style: disc; font-size: 10pt; color: #1e293b; line-height: 1.45; }

.tips-list li + li { margin-top: 3px; }

/* Test grid: power down the side, speed along the top, one square to burn per cell */

.grid-scroll { overflow-x: auto; }

.grid-table { width: 100%; border-collapse: collapse; font-size: 9pt; font-variant-numeric: tabular-nums; background: #fff; }

.grid-table th, .grid-table td { border: 1px solid #cbd5e1; padding: 4px 6px; text-align: center; }

.grid-table th { background: #f1f5f9; color: #475569; font-weight: 700; white-space: nowrap; }

.grid-table td { height: 28px; min-width: 56px; }

/* Save to library row */

.save-row { display: flex; align-items: center; gap: 8px; }

.save-row.hidden { display: none; }

/* My library: one saved preset per row (same row and × button as the other tools' lists) */

.lib-row { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 8px 12px; }

.task-btn { color: #94a3b8; font-size: 11pt; line-height: 1; padding: 1px 3px; }
.task-btn:hover { color: #4f46e5; }

/* Export window: the file type badge */

.format-ext {
  flex-shrink: 0; width: 2.25rem; height: 2rem; margin-top: 2px; border-radius: 0.5rem;
  display: grid; place-items: center; background: #e0e7ff; color: #4338ca;
  font-size: 7.5pt; font-weight: 700; text-transform: uppercase;
}

#formatList { max-height: 60vh; }

/* Print / PDF: the settings and test grid, or the library list. */

.print-only { display: none; }

@media print {
  @page { margin: 12mm; size: letter portrait; }

  html, body, main, main > section, main section > div, #settingsView, #libraryView {
    height: auto !important; min-height: 0 !important; max-height: none !important;
    overflow: visible !important; position: static !important;
    background: #fff !important; box-shadow: none !important; border: 0 !important; padding: 0 !important;
  }
  main, main > section, main section > div { display: block !important; }
  #toolHeader, #outputLockOverlay, #exampleBadge, #countText, .task-btn, .no-print { display: none !important; }

  .print-only { display: block !important; white-space: pre-wrap; font-size: 11pt; font-weight: 600; line-height: 1.4; margin-bottom: 8px; }
  .stack:not(.hidden) { display: flex !important; }
  .lib-row, .warn-box, .result-tile { break-inside: avoid; border: 1px solid #cbd5e1 !important; }
  .grid-table th, .grid-table td { border-color: #475569; }
}
