
/* Stile non distruttivo – non cambia ID o struttura DOM */
:root {
  --bg: #f5f7f9;
  --fg: #24333e;
  --muted: #6b7a86;
  --brand: #063f70;
  --accent: #1b7a5f;
  --card-bg: #ffffff;
  --tick: #b7c4cc;
}

html, body { height: 100%; }
body {
  /*margin: 0; background: var(--bg); color: var(--fg); font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;*/
}

.app-header { padding: 16px 20px; }
.title { font-size: 20px; margin: 0; }

.app { max-width: 1100px; margin: 0 auto; padding: 12px 20px 32px; }

.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.control-block { background: var(--card-bg); border-radius: 10px; padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.control-label { display:block; font-weight:600; margin-bottom:10px; }

.slider-wrap { position: relative; height: 48px; }
.slider { width: 100%; height: 36px; -webkit-appearance: none; appearance: none; background: linear-gradient(to right, #e4ebf1, #e4ebf1); border-radius: 8px; padding: 0; margin: 0; }
.slider:focus { outline: none; }

/* Thumb grande e touch-friendly */
.slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; background: var(--brand); border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,.2); cursor: pointer; }
.slider::-moz-range-thumb { width: 24px; height: 24px; background: var(--brand); border: none; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,.2); cursor: pointer; }

/* Track */
.slider::-webkit-slider-runnable-track { height: 8px; background: #d8e2ea; border-radius: 8px; }
.slider::-moz-range-track { height: 8px; background: #d8e2ea; border-radius: 8px; }

/* Tacche visive, generate dinamicamente da app.js */
.ticks { position: absolute; left: 0; right: 0; height: 8px; top: 16px; pointer-events: none; }
.tick { position: absolute; width: 2px; height: 8px; background: var(--tick); transform: translateX(-1px); }

.slider-tooltip { position: fixed; background: #173d2f; color: #fff; padding: 4px 8px; font-size: 12px; border-radius: 6px; pointer-events: none; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.snap-readout { margin-top: 6px; color: var(--muted); font-size: 14px; }

.canvas-section { display: flex; justify-content: center; align-items: center; padding: 32px 0; }
#sheetCanvas { background: #ffffff; border-radius: 14px; box-shadow: 0 2px 12px rgba(0,0,0,.08); display: none;}

.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.product-card { background: var(--card-bg); border-radius: 10px; padding: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.06); border-top: 3px solid var(--brand); }
.product-name { margin: 0 0 8px; font-size: 16px; color: var(--accent); }
.product-value { font-size: 14px; color: var(--fg); }

.empty { grid-column: 1/-1; text-align: center; color: var(--muted); padding: 16px; }

.app-footer { padding: 8px 20px 24px; color: var(--muted); font-size: 12px; }
.product-matrix {
  font-size: 13px;
  line-height: 1.5;
  border-top: 1px solid #e1e6ea;
  margin-top: 8px;
  padding-top: 8px;
}

.matrix-row {
  padding: 2px 0;
  color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (max-width: 980px) {
  .controls { grid-template-columns: 1fr; }
  .results { grid-template-columns: 1fr; }
}
