/* SuperToolZone First-Look Calculator UI v3.5
   Keeps calculator logic/data unchanged. Makes inputs + outputs visible together above the fold. */

/* Reduce page chrome directly around the calculator. */
.stz-tool-main .section > .wrap > .content-card{
  padding:14px!important;
}
.stz-tool-main .content-card > h2{
  margin:0 0 3px!important;
  font-size:clamp(1.05rem,1.6vw,1.35rem)!important;
  line-height:1.2!important;
}
.stz-tool-main .content-card > .small-note{
  margin:0 0 8px!important;
  font-size:.76rem!important;
  line-height:1.35!important;
}

/* Duplicate enhancement controls must not push the calculator below the fold. */
.stz-v2-quick-actions,
.stz-v2-status{
  display:none!important;
}

.stz-advanced-calculator{
  margin-top:6px!important;
}

@media (min-width: 900px){
  .stz-calc-workspace{
    grid-template-columns:350px minmax(430px,1fr)!important;
    gap:12px!important;
  }

  .stz-input-panel .stz-calc-grid{
    padding:6px 9px 3px!important;
    gap:1px!important;
  }
  .stz-input-panel .stz-calc-grid>label,
  .stz-global-preferences-grid label{
    grid-template-columns:minmax(160px,1fr) 112px!important;
    min-height:29px!important;
    gap:7px!important;
    font-size:.78rem!important;
  }
  .stz-input-panel .stz-calc-grid input,
  .stz-input-panel .stz-calc-grid select,
  .stz-global-preferences-grid select{
    width:112px!important;
    max-width:112px!important;
    height:28px!important;
    min-height:28px!important;
    padding:2px 6px!important;
    font-size:.8rem!important;
  }
  .stz-global-preferences-grid label:first-child select{
    width:142px!important;
    max-width:142px!important;
  }
  .stz-global-preferences{
    padding:5px 9px!important;
  }
  .stz-global-preferences-grid{
    gap:2px!important;
  }
  .stz-currency-note{
    display:none!important;
  }
  .stz-panel-head{
    min-height:34px!important;
    padding:5px 9px!important;
  }
  .stz-panel-head h3{
    font-size:.9rem!important;
  }
  .stz-print-link{
    min-height:25px!important;
    padding:2px 7px!important;
  }
  .stz-calc-actions{
    padding:6px 9px!important;
  }
  .stz-calc-actions button{
    min-height:30px!important;
    padding:4px 12px!important;
  }
  .stz-input-panel .stz-precision-row,
  .stz-input-panel .stz-scenario-controls{
    padding:4px 8px!important;
    font-size:.68rem!important;
  }

  /* Compact result summary like the approved reference. */
  .stz-primary-result{
    min-height:38px!important;
    padding:6px 10px!important;
  }
  .stz-primary-result span{font-size:.94rem!important}
  .stz-primary-result strong{font-size:1.28rem!important}
  .stz-result-list,
  .stz-output-panel .stz-result-grid,
  .stz-calc-results{
    padding:3px 10px 4px!important;
  }
  .stz-calc-result{
    min-height:29px!important;
    padding:4px 0!important;
    border-bottom:1px solid #edf0f1!important;
  }
  .stz-calc-result span,
  .stz-calc-result strong{
    font-size:.78rem!important;
  }
  .stz-result-note{
    padding:3px 10px 5px!important;
    font-size:.62rem!important;
  }

  /* Advanced controls stay available after the analysis, not before first result. */
  .stz-utility-bar{
    margin-top:7px!important;
    padding:5px!important;
    gap:4px!important;
  }
  .stz-utility-bar button{
    min-height:27px!important;
    padding:3px 7px!important;
    font-size:.65rem!important;
  }

  /* Keep charts and schedules immediately below the first-look workspace. */
  .stz-analysis{
    margin-top:9px!important;
  }
  .stz-chart-grid article{
    min-height:220px!important;
    padding:8px!important;
  }
  .stz-chart-grid canvas{
    max-height:175px!important;
  }
  .stz-table-toolbar{
    padding:6px 0!important;
  }
  .stz-data-table th,
  .stz-data-table td{
    padding:5px 7px!important;
    font-size:.72rem!important;
  }
}

/* Tablet: keep both panels visible when enough width exists. */
@media (min-width:720px) and (max-width:899px){
  .stz-calc-workspace{
    grid-template-columns:330px minmax(340px,1fr)!important;
    gap:10px!important;
  }
  .stz-v2-quick-actions,.stz-v2-status{display:none!important}
}

/* Mobile remains clean and usable. */
@media (max-width:719px){
  .stz-tool-main .section > .wrap > .content-card{padding:9px!important}
  .stz-tool-main .content-card > .small-note{font-size:.7rem!important;margin-bottom:6px!important}
  .stz-calc-workspace{gap:8px!important}
  .stz-input-panel .stz-calc-grid>label,
  .stz-global-preferences-grid label{
    min-height:31px!important;
  }
  .stz-input-panel .stz-calc-grid input,
  .stz-input-panel .stz-calc-grid select,
  .stz-global-preferences-grid select{
    height:31px!important;
    min-height:31px!important;
  }
  .stz-primary-result{padding:7px 9px!important}
  .stz-primary-result strong{font-size:1.2rem!important}
}
