/* Patrol Scans usability polish · Nov 2026
   Scoped to stopwatch editor and compact landscape; does not touch warning mode. */

/* Stopwatch tile: separate, clearly labeled reset for each independent timer. */
#stage .tile-controls{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:clamp(4px,1vw,9px)!important}
#stage .tile-controls .tile-reset{
  font-size:clamp(10px,1.8vw,14px)!important;font-weight:750!important;
  color:#ffebac!important;border:1px solid #c29a3f!important;
  background:linear-gradient(160deg,#493313,#19130b)!important;
  white-space:nowrap;min-width:0;padding:4px 2px;
}
#stage .tile-controls .tile-reset:active{filter:brightness(1.2)}
@media (max-width:420px){
  #stage .tile-controls{gap:5px!important}
  #stage .tile-controls .tile-reset{font-size:11px!important}
}

/* The edit sheet belongs to the same gold-on-carbon Patrol Scans design. */
html body #modalShade .modal{
  background:linear-gradient(145deg,rgba(32,34,38,.98),rgba(7,9,13,.99))!important;
  border:2px solid #d3a63b!important;
  border-radius:16px!important;
  box-shadow:0 20px 58px #000f,inset 0 1px 0 #fff3!important;
  color:#f2f3f5!important;
  width:min(95vw,480px)!important;
  max-height:min(91dvh,760px)!important;
  padding:clamp(12px,3vw,19px)!important;
  scrollbar-color:#c69b37 #111;
}
html body #modalShade .modal h2{color:#f4cf62!important;font-weight:850!important;font-size:19px}
html body #modalShade .modal label{font-size:12px;color:#e0e4ec!important;font-weight:680}
html body #modalShade .modal :is(input:not([type="checkbox"]),select){
  background:#0c1624!important;border:1px solid #7e8b9f!important;
  color:#fff!important;border-radius:8px!important;min-height:40px;
}
html body #modalShade .modal .tinyhelp{color:#bfc7d1!important}
html body #modalShade .modal .maskpreview{
  color:#ffcf39!important;font-weight:900!important;font-variant-numeric:tabular-nums;
  font-size:clamp(27px,7vw,37px);letter-spacing:0;
  text-align:center;text-shadow:0 2px 4px #000a;
}
html body #modalShade .modal .buttons button{
  background:linear-gradient(#283747,#0f1722)!important;color:#e9ecf2!important;
  border:1px solid #6d8197!important;border-radius:9px;
}
html body #modalShade .modal .buttons button.primary{
  background:linear-gradient(#ffe07d,#c99827)!important;color:#1a1508!important;
  border-color:#ffe49c!important;
}

/* The tabs keep food tools out of the quick timer-setting workflow. */
.ps-editor-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:10px 0 12px}
html body #modalShade .modal .ps-editor-tab{
  min-height:43px;padding:8px 5px;
  border:1px solid #75622e;border-radius:9px;
  background:linear-gradient(145deg,#272b31,#121417);
  color:#dbe0e7;font-size:12px;font-weight:800;
}
html body #modalShade .modal .ps-editor-tab[aria-selected="true"]{
  background:linear-gradient(145deg,#f8d36d,#ad7d21)!important;
  color:#17120a!important;border-color:#ffdc8a;box-shadow:inset 0 1px 0 #fff8;
}
.ps-editor-panel[hidden]{display:none!important}
.ps-editor-panel{min-width:0}
.ps-editor-panel .bt-food-combo>#btFoodTrigger{
  background:linear-gradient(145deg,#3c2e16,#211a10)!important;
  border-color:#d6a344!important;color:#ffe9b5!important;
}
.ps-editor-panel .bt-food-list{background:#191c1f!important;border-color:#b38c3a!important}
.ps-editor-panel .bt-food-option{background:#202124!important;color:#f4f1e6!important}
.ps-editor-panel .bt-food-option:hover{background:#493d22!important}
.ps-editor-panel .bt-colors{background:#242018!important;border-color:#977c40!important}
.ps-editor-panel .bt-colors summary{color:#f8de9a!important}
.ps-editor-panel .bt-color-grid button{background:#34302a!important;border-color:#887447!important}
.ps-editor-panel .bt-temp-section{margin-top:12px}
.ps-editor-panel .bt-food-hint{color:#d8cfad}
.ps-editor-panel .bt-safety{color:#c6cbd5}

/* Digit groups: genuine input fields, not a seven-digit entry mask. */
.ps-time-entry{
  display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,.8fr);
  gap:3px;align-items:end;margin:8px 0 9px;
}
.ps-time-unit{min-width:0;display:flex;flex-direction:column;align-items:center;gap:3px}
html body #modalShade .modal .ps-time-unit>label{
  margin:0!important;font-size:10px!important;letter-spacing:.02em;color:#cbd1d9!important
}
html body #modalShade .modal .ps-time-unit>input{
  text-align:center!important;width:100%!important;min-width:0!important;
  font:800 clamp(18px,5vw,26px)/1.1 ui-monospace,Consolas,monospace!important;
  padding:6px 2px!important;border-color:#c49c3c!important;
  font-variant-numeric:tabular-nums;
}
.ps-time-colon{align-self:center;color:#f6d675;font-weight:900;font-size:24px;padding-top:14px}
.ps-time-step{display:flex;width:100%;gap:2px}
html body #modalShade .modal .ps-time-step button{
  flex:1;min-height:29px;border:1px solid #8e7336;border-radius:6px;
  background:#26221b;color:#f7d77d;font-size:15px;font-weight:900;
}
html body #modalShade .modal .ps-time-step button:active{background:#6b5223}
@media (max-width:380px){
 .ps-time-entry{gap:2px}
 .ps-time-colon{font-size:17px}
 html body #modalShade .modal .ps-time-unit>input{font-size:19px!important}
}

/* Hide only the site-wide header in short landscape, recovering real usable height.
   Keep the Fullscreen control inside the clock frame available. */
@media (orientation:landscape) and (max-height:620px){
  html.rcm-web-fusion{--rcm-web-top:0px!important}
  html.rcm-web-fusion .rcm-web-header{display:none!important;visibility:hidden!important}
  html.rcm-web-fusion .rcm-web-stopwatch-page{top:0!important}
  html.rcm-web-fusion body:not(.log-page-mode):not(.v065-settings-page):not(.rcm-web-on-stopwatch) main.app{
    padding:3px max(4px,env(safe-area-inset-right)) 3px max(4px,env(safe-area-inset-left))!important;
    overflow:hidden!important;
  }
  html.rcm-web-fusion body:not(.log-page-mode):not(.v065-settings-page):not(.rcm-web-on-stopwatch) #alarmClockFrame{
    height:100%!important;max-height:100%!important;min-height:0!important;
    display:flex!important;flex-direction:column!important;
    gap:clamp(2px,.7vh,6px)!important;padding:clamp(3px,.9vh,8px)!important;
    box-sizing:border-box!important;overflow:hidden!important;
  }
  html.rcm-web-fusion body:not(.log-page-mode):not(.v065-settings-page):not(.rcm-web-on-stopwatch) #alarmClockFrame>.top{
    flex:0 0 auto!important;margin:0!important;min-height:0!important
  }
  html.rcm-web-fusion body:not(.log-page-mode):not(.v065-settings-page):not(.rcm-web-on-stopwatch) #alarmClockFrame #clock{
    flex:1 1 0%!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:2px!important;gap:clamp(0px,.6vh,4px)!important;
    overflow:hidden!important;justify-content:center!important;
    box-sizing:border-box!important;
  }
  html.rcm-web-fusion body:not(.log-page-mode):not(.v065-settings-page):not(.rcm-web-on-stopwatch) #alarmClockFrame #current{
    font-size:clamp(38px,15dvh,90px)!important;line-height:1.0!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    white-space:nowrap!important;overflow:visible!important;
    text-align:center!important;letter-spacing:-.035em!important;
  }
  html.rcm-web-fusion body:not(.log-page-mode):not(.v065-settings-page):not(.rcm-web-on-stopwatch) #alarmClockFrame #betaLastCheck{
    flex:0 1 auto!important;max-width:98%!important;min-width:0!important;
    margin:1px auto!important;padding:2px clamp(6px,1.5vw,14px)!important;
    font-size:clamp(11px,3.1vh,19px)!important;line-height:1.15!important;
    white-space:nowrap!important;
  }
  html.rcm-web-fusion body:not(.log-page-mode):not(.v065-settings-page):not(.rcm-web-on-stopwatch) #alarmClockFrame .quick-three{
    flex:0 0 auto!important;margin:0!important;min-height:0!important;
  }
  html.rcm-web-fusion body:not(.log-page-mode):not(.v065-settings-page):not(.rcm-web-on-stopwatch) #alarmClockFrame .quick-three .btn{
    min-height:clamp(32px,10vh,48px)!important;padding:3px 7px!important
  }
}


/* Quick pause from the live countdown edit dialog.
   This is a control-only addition: no warning, logging or countdown engine changes. */
.countdown-editor .countdown-edit-pause-row{display:flex;justify-content:center;margin:-3px 0 13px}
.countdown-editor .countdown-edit-pause-row[hidden]{display:none!important}
.countdown-editor #pauseCountdownToEdit{
  min-height:38px;max-width:100%;padding:7px 15px;
  background:linear-gradient(145deg,#423115,#211a0e)!important;
  border:1px solid #d3ad51!important;border-radius:9px;
  color:#ffe4a0!important;font-weight:800;white-space:normal;
}
.countdown-editor #pauseCountdownToEdit:focus-visible{outline:2px solid #fff;outline-offset:2px}
