/* Scholar Ship Clock + Timer Tool */

#clockToolBtn,
#scholarClockButton,
.scholar-clock-button{
  font-size:18px;
  width:28px;
  height:26px;
  line-height:24px;
  padding:0;
  flex:0 0 28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

#clockToolBtn.is-open,
#scholarClockButton.is-open,
.scholar-clock-button.is-open{
  color:#f3d56d;
  box-shadow:0 0 8px rgba(199,166,82,.5);
}

.clock-timer-chip{
  appearance:none;
  border:1px solid rgba(243,213,109,.85);
  background:rgba(0,0,0,.72);
  color:#f3d56d;
  height:26px;
  min-width:54px;
  max-width:92px;
  padding:0 6px;
  font:900 11px/24px ui-monospace,SFMono-Regular,Menlo,monospace;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  cursor:pointer;
  flex:0 0 auto;
}

.clock-timer-chip[hidden]{
  display:none !important;
}

.scholar-clock-dim{
  position:absolute;
  inset:0;
  z-index:10039;
  display:none;
  background:rgba(0,0,0,.54);
  pointer-events:none;
}

.scholar-clock-dim.is-open{
  display:block;
}

.scholar-clock-panel{
  position:absolute;
  top:48px;
  right:28px;
  z-index:10040;
  width:166px;
  padding:8px;
  box-sizing:border-box;
  background:rgba(0,0,0,.78);
  border:1px solid rgba(243,213,109,.95);
  color:#f3d56d;
  pointer-events:auto;
  display:none;
  visibility:visible;
  opacity:1;
  overflow:visible;
}

.scholar-clock-panel.is-open{
  display:block !important;
}

.scholar-clock-head{
  display:grid;
  grid-template-columns:22px minmax(0,1fr) 22px;
  align-items:center;
  height:26px;
  border-bottom:1px solid rgba(243,213,109,.35);
  margin-bottom:7px;
}

.scholar-clock-head-spacer{
  width:22px;
  height:26px;
}

.scholar-clock-readout{
  text-align:center;
  justify-self:center;
  align-self:center;
  font:900 11px/26px ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.06em;
  text-transform:uppercase;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}

.scholar-clock-close{
  appearance:none;
  border:0;
  background:transparent;
  color:#f3d56d;
  width:22px;
  height:26px;
  padding:0;
  display:grid;
  place-items:center;
  font:900 19px/1 system-ui,sans-serif;
  cursor:pointer;
}

.scholar-clock-close:hover{
  background:rgba(243,213,109,.14);
}

.scholar-clock-tool-body{
  position:relative;
  min-height:0;
}

.scholar-clock-timer-tab{
  position:absolute;
  left:0;
  top:0;
  z-index:2;
  appearance:none;
  border:1px solid rgba(243,213,109,.45);
  background:rgba(0,0,0,.62);
  color:#f3d56d;
  width:24px;
  height:22px;
  padding:0;
  display:grid;
  place-items:center;
  font:900 14px/1 system-ui,sans-serif;
  cursor:pointer;
}

.scholar-clock-timer-tab:hover{
  background:rgba(243,213,109,.14);
}

.scholar-clock-body{
  display:block;
}

.scholar-timer-body{
  display:none;
}

.scholar-clock-panel.show-timer .scholar-clock-body{
  display:none;
}

.scholar-clock-panel.show-timer .scholar-timer-body{
  display:block;
}

.scholar-clock-face{
  width:146px;
  height:146px;
  margin:0 auto;
  box-sizing:border-box;
  cursor:pointer;
}

.scholar-clock-svg{
  display:block;
  width:100%;
  height:100%;
  overflow:visible;
}

.scholar-clock-svg-outer{
  fill:rgba(8,8,8,.72);
  stroke:#f3d56d;
  stroke-width:2;
}

.scholar-clock-svg-number{
  fill:#f3d56d;
  font:900 14px ui-monospace,SFMono-Regular,Menlo,monospace;
  text-anchor:middle;
  dominant-baseline:middle;
}

.scholar-clock-svg-tick{
  stroke:rgba(243,213,109,.45);
  stroke-width:1;
}

.scholar-clock-svg-tick.major{
  stroke:rgba(243,213,109,.8);
  stroke-width:1.5;
}

.scholar-clock-svg-hand{
  stroke:#f3d56d;
  stroke-linecap:round;
  filter:drop-shadow(0 0 3px rgba(243,213,109,.75));
}

.scholar-clock-svg-hand.hour{
  stroke-width:5;
}

.scholar-clock-svg-hand.minute{
  stroke-width:3;
}

.scholar-clock-svg-hand.second{
  stroke-width:1.2;
  opacity:.65;
}

.scholar-clock-svg-pin{
  fill:#f3d56d;
}

/* Timer */

.scholar-timer-body{
  width:146px;
  margin:0 auto;
  padding-top:0;
  box-sizing:border-box;
}

.scholar-timer-top-row{
  display:grid;
  grid-template-columns:1fr 26px;
  gap:4px;
  align-items:center;
  margin-bottom:6px;
  padding-left:29px;
}

.scholar-timer-icon-btn,
.scholar-timer-mode,
.scholar-timer-presets button,
.scholar-timer-controls button,
.scholar-timer-speaker-menu button{
  appearance:none;
  border:1px solid rgba(243,213,109,.55);
  background:rgba(0,0,0,.65);
  color:#f3d56d;
  font:900 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  height:23px;
  padding:0 5px;
  cursor:pointer;
}

.scholar-timer-icon-btn{
  width:26px;
  padding:0;
  font-size:13px;
  display:grid;
  place-items:center;
}

.scholar-timer-mode{
  width:100%;
}

.scholar-timer-mode:disabled,
.scholar-timer-presets button:disabled,
.scholar-timer-display:disabled,
.scholar-timer-prestart-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.scholar-timer-display:disabled{
  opacity:1;
  color:#f3d56d;
  -webkit-text-fill-color:#f3d56d;
}

.scholar-timer-speaker-wrap{
  position:relative;
}

.scholar-timer-speaker-menu{
  position:absolute;
  top:27px;
  right:0;
  z-index:4;
  display:none;
  min-width:74px;
  background:rgba(0,0,0,.94);
  border:1px solid rgba(243,213,109,.75);
}

.scholar-timer-speaker-menu.open{
  display:block;
}

.scholar-timer-speaker-menu button{
  width:100%;
  border:0;
  height:24px;
  text-align:left;
}

/* Timer display and pre-start countdown buttons */

.scholar-timer-display-wrap{
  display:grid;
  grid-template-columns:minmax(0,1fr) 30px;
  align-items:stretch;
  width:100%;
  height:42px;
  box-sizing:border-box;
  margin:0 0 6px;
  border:1px solid rgba(243,213,109,.55);
  background:rgba(0,0,0,.52);
  overflow:hidden;
}

.scholar-timer-display-wrap .scholar-timer-display{
  display:block;
  width:100%;
  min-width:0;
  height:40px;
  margin:0;
  padding:0 5px;
  box-sizing:border-box;
  border:0;
  border-radius:0;
  outline:0;
  background:transparent;
  color:#f3d56d;
  text-align:center;
  font:900 29px/40px ui-monospace,SFMono-Regular,Menlo,monospace;
  text-shadow:0 0 7px rgba(243,213,109,.5);
}

.scholar-timer-display-wrap .scholar-timer-display:focus{
  box-shadow:
    inset 0 0 0 1px rgba(243,213,109,.45),
    inset 0 0 10px rgba(243,213,109,.08);
}

.scholar-timer-display-wrap .scholar-timer-display:disabled{
  opacity:1;
  color:#f3d56d;
  -webkit-text-fill-color:#f3d56d;
}

.scholar-timer-prestart-options{
  display:grid;
  grid-template-rows:repeat(3,minmax(0,1fr));
  width:30px;
  min-width:30px;
  height:40px;
  box-sizing:border-box;
  border-left:1px solid rgba(243,213,109,.42);
}

.scholar-timer-prestart-btn{
  appearance:none;
  -webkit-appearance:none;
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-width:0;
  min-height:0;
  height:auto;
  margin:0;
  padding:0;
  box-sizing:border-box;
  border:0;
  border-radius:0;
  border-bottom:1px solid rgba(243,213,109,.28);
  background:rgba(0,0,0,.48);
  color:#f3d56d;
  font:900 8px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  text-align:center;
  cursor:pointer;
}

.scholar-timer-prestart-btn:last-child{
  border-bottom:0;
}

.scholar-timer-prestart-btn:hover:not(:disabled),
.scholar-timer-prestart-btn:focus-visible,
.scholar-timer-prestart-btn.selected{
  background:rgba(243,213,109,.18);
}

.scholar-timer-prestart-btn:focus-visible{
  outline:1px solid rgba(243,213,109,.9);
  outline-offset:-1px;
}

.scholar-timer-prestart-btn.selected{
  box-shadow:inset 0 0 0 1px rgba(243,213,109,.72);
  text-shadow:0 0 5px rgba(243,213,109,.7);
}

.scholar-timer-presets{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:3px;
  margin-bottom:6px;
}

.scholar-timer-presets button{
  padding:0;
  font-size:8px;
}

.scholar-timer-controls{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:4px;
}

.scholar-timer-controls button{
  height:27px;
  font-size:11px;
}

.scholar-timer-icon-btn:hover:not(:disabled),
.scholar-timer-mode:hover:not(:disabled),
.scholar-timer-presets button:hover:not(:disabled),
.scholar-timer-controls button:hover:not(:disabled),
.scholar-timer-speaker-menu button:hover:not(:disabled){
  background:rgba(243,213,109,.14);
}

/* Inspect mode */

.scholar-clock-panel.is-inspecting{
  left:50%;
  top:50%;
  right:auto;
  transform:translate(-50%,-50%);
  width:min(64vmin,420px);
  padding:14px;
  z-index:10080;
}

.scholar-clock-panel.is-inspecting .scholar-clock-head{
  height:34px;
  margin-bottom:10px;
  grid-template-columns:32px minmax(0,1fr) 32px;
}

.scholar-clock-panel.is-inspecting .scholar-clock-head-spacer{
  width:32px;
  height:34px;
}

.scholar-clock-panel.is-inspecting .scholar-clock-readout{
  font-size:17px;
  line-height:34px;
}

.scholar-clock-panel.is-inspecting .scholar-clock-close{
  width:32px;
  height:34px;
  font-size:26px;
}

.scholar-clock-panel.is-inspecting .scholar-clock-face{
  width:min(52vmin,340px);
  height:min(52vmin,340px);
}

.scholar-clock-panel.is-inspecting .scholar-timer-body{
  width:min(52vmin,340px);
}

.scholar-clock-panel.is-inspecting .scholar-clock-timer-tab{
  width:32px;
  height:28px;
  font-size:18px;
}

.scholar-clock-panel.is-inspecting .scholar-timer-top-row{
  grid-template-columns:1fr 32px;
  padding-left:36px;
}

.scholar-clock-panel.is-inspecting .scholar-timer-display-wrap{
  grid-template-columns:minmax(0,1fr) 44px;
  height:64px;
}

.scholar-clock-panel.is-inspecting
.scholar-timer-display-wrap
.scholar-timer-display{
  height:62px;
  padding:0 8px;
  font-size:44px;
  line-height:62px;
}

.scholar-clock-panel.is-inspecting
.scholar-timer-prestart-options{
  width:44px;
  min-width:44px;
  height:62px;
}

.scholar-clock-panel.is-inspecting
.scholar-timer-prestart-btn{
  font-size:11px;
}

.scholar-clock-panel.is-inspecting .scholar-timer-mode,
.scholar-clock-panel.is-inspecting .scholar-timer-icon-btn,
.scholar-clock-panel.is-inspecting .scholar-timer-presets button,
.scholar-clock-panel.is-inspecting .scholar-timer-controls button{
  height:28px;
  font-size:12px;
}

@media (max-width:700px), (orientation:portrait){
  .scholar-clock-panel{
    top:6px;
    right:18px;
    width:166px;
    padding:8px;
  }

  .scholar-clock-face,
  .scholar-timer-body{
    width:146px;
    height:auto;
  }

  .scholar-clock-face{
    height:146px;
  }

  .scholar-clock-readout{
    font-size:10px;
  }
}