﻿/* Active workout polish: compact logger, glass summary, and set rows */

/* Active workout: compact logger pass */
body.workout-mode .active-workout-head {
  position: fixed !important;
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 80 !important;
  max-width: 760px !important;
  width: 100% !important;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px !important;
  background: transparent !important;
  border-bottom: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  isolation: isolate;
  pointer-events: none;
}
body.workout-mode .active-workout-head::before,
body.workout-mode .active-workout-head::after {
  display: none !important;
  content: none !important;
}
body.workout-mode .active-workout-title-block {
  display: none !important;
}
body.workout-mode .active-workout-head > div:last-child {
  width: 100%;
  flex: 1 1 auto;
}
body.workout-mode .active-workout-topbar {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 6px 5px 54px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 10% 30%, rgba(96,212,244,0.11), transparent 34%),
    rgba(3,4,8,0.68);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 14px 38px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.07);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  pointer-events: auto;
}
body.workout-mode .active-workout-topbar .active-workout-timer-pill {
  min-width: auto !important;
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #ffb36b !important;
  box-shadow: none !important;
  font-size: 18px !important;
  letter-spacing: .6px;
}
body.workout-mode .active-top-finish-btn {
  min-height: 34px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2aa8ff, #0578ff);
  color: white;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .2px;
  box-shadow: 0 10px 26px rgba(5,120,255,0.26), inset 0 1px 0 rgba(255,255,255,0.28);
}
body.workout-mode .active-screen-close {
  top: max(15px, calc(10px + env(safe-area-inset-top, 0px))) !important;
  left: max(18px, calc(50% - 366px)) !important;
  right: auto !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  color: rgba(255,255,255,0.86) !important;
  z-index: 90 !important;
  transform: none !important;
  pointer-events: auto;
  font-size: 0 !important;
}
body.workout-mode .active-screen-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.workout-mode .active-workout-exercises {
  padding-top: calc(68px + env(safe-area-inset-top, 0px)) !important;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
}
body.workout-mode .active-session-summary-host {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 0 18px 2px;
  flex: 0 0 auto;
}
body.workout-mode .active-session-summary {
  margin: 0 0 14px;
  padding: 4px 0 13px;
  display: block;
  border-bottom: 1px solid rgba(255,255,255,0.09);
}
body.workout-mode .active-session-kicker {
  margin-bottom: 4px;
  font-size: 8px;
  line-height: 1;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 950;
}
body.workout-mode .active-session-title {
  color: var(--text);
  font-size: 25px;
  line-height: .98;
  font-weight: 950;
  letter-spacing: -.55px;
}
body.workout-mode .active-session-metrics {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
body.workout-mode .active-session-metric {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
}
body.workout-mode .active-session-metric b {
  display: block;
  color: var(--text);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  line-height: .9;
  letter-spacing: .45px;
}
body.workout-mode .active-session-metric span {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,0.42);
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: 1.25px;
  font-weight: 900;
}
body.workout-mode .active-session-metric.prs {
  border-color: rgba(232,244,77,0.18);
  background: rgba(232,244,77,0.055);
}
body.workout-mode .active-ex-card.done {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
body.workout-mode .active-workout-finish-row {
  display: none !important;
}
body.workout-mode .active-repeat-prev {
  display: none !important;
}
body.workout-mode .active-set-prev-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
body.workout-mode .active-set-prev-btn::before {
  content: '↺';
  font-size: 10px;
  opacity: .9;
}
@media(max-width:430px){
  body.workout-mode .active-workout-head {
    padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px !important;
  }
  body.workout-mode .active-workout-exercises {
    padding-top: calc(58px + env(safe-area-inset-top, 0px)) !important;
  }
  body.workout-mode .active-workout-topbar {
    min-height: 40px;
    padding: 4px 5px 4px 46px;
  }
  body.workout-mode .active-screen-close {
    top: max(12px, calc(8px + env(safe-area-inset-top, 0px))) !important;
    left: 15px !important;
    width: 32px !important;
    height: 32px !important;
  }
  body.workout-mode .active-workout-topbar .active-workout-timer-pill {
    font-size: 15px !important;
  }
  body.workout-mode .active-session-summary-host {
    padding: 0 14px;
  }
  body.workout-mode .active-top-finish-btn {
    min-height: 31px;
    padding: 0 11px;
    font-size: 11px;
  }
  body.workout-mode .active-session-summary {
    padding: 2px 0 11px;
  }
  body.workout-mode .active-session-title {
    font-size: 22px;
  }
  body.workout-mode .active-session-metrics {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 6px;
  }
  body.workout-mode .active-session-metric {
    min-width: 0;
    padding: 7px 8px;
    border-radius: 12px;
  }
  body.workout-mode .active-session-metric b {
    font-size: 19px;
  }
}

/* Active workout polish: glass summary only */
body.workout-mode .active-workout-topbar {
  min-height: 44px !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.026)),
    radial-gradient(circle at 12% 24%, rgba(96,212,244,0.14), transparent 36%),
    rgba(4,8,15,0.60) !important;
  border-color: rgba(255,255,255,0.12) !important;
  box-shadow:
    0 16px 42px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -1px 0 rgba(96,212,244,0.06) !important;
}
body.workout-mode .active-session-summary {
  margin: 4px 0 14px !important;
  padding: 0 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 58px !important;
  flex: 0 0 auto !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  border-radius: 19px !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.105), rgba(255,255,255,0.035)),
    radial-gradient(circle at 14% 0%, rgba(96,212,244,0.14), transparent 42%),
    radial-gradient(circle at 85% 110%, rgba(232,244,77,0.055), transparent 38%),
    rgba(15,20,30,0.58) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(255,255,255,0.045),
    0 16px 36px rgba(0,0,0,0.20) !important;
  backdrop-filter: blur(20px) saturate(1.22);
  -webkit-backdrop-filter: blur(20px) saturate(1.22);
  overflow: hidden;
}
body.workout-mode .active-session-metrics {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0 !important;
}
body.workout-mode .active-session-metric {
  min-width: 0 !important;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 13px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.workout-mode .active-session-metric + .active-session-metric {
  border-left: 1px solid rgba(255,255,255,0.115) !important;
}
body.workout-mode .active-session-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}
body.workout-mode .active-session-text span {
  margin: 0 !important;
  color: rgba(255,255,255,0.60) !important;
  font-size: 9px !important;
  line-height: 1;
  letter-spacing: .25px !important;
  text-transform: none;
  font-weight: 950;
}
body.workout-mode .active-session-text b {
  margin-top: 6px;
  display: block;
  color: var(--text);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px !important;
  line-height: .86 !important;
  letter-spacing: .55px;
  white-space: nowrap;
}
body.workout-mode .active-session-metric.prs .active-session-text b {
  color: var(--accent);
}
@media(max-width:430px){
  body.workout-mode .active-session-summary-host {
    padding: 0 10px 2px;
  }
  body.workout-mode .active-session-summary {
    margin: 3px 0 12px !important;
    border-radius: 16px !important;
  }
  body.workout-mode .active-session-metric {
    min-height: 48px;
    padding: 9px 9px !important;
  }
  body.workout-mode .active-session-text span {
    font-size: 8px !important;
    letter-spacing: .15px !important;
  }
  body.workout-mode .active-session-text b {
    font-size: 21px !important;
  }
}

/* Active workout polish: set rows */
body.workout-mode .active-ex-card {
  padding-top: 15px !important;
  padding-bottom: 15px !important;
}
body.workout-mode .active-ex-top {
  margin-bottom: 9px !important;
}
body.workout-mode .active-ex-title {
  max-width: 100%;
  font-size: 15.5px !important;
  line-height: 1.12 !important;
  letter-spacing: -.15px !important;
}
body.workout-mode .active-ex-sub {
  font-size: 9px !important;
  opacity: .86;
}
body.workout-mode .active-tag-row {
  margin-bottom: 9px !important;
}
body.workout-mode .active-set-head,
body.workout-mode .active-set-line {
  grid-template-columns: 26px minmax(94px, 1fr) minmax(64px, .62fr) minmax(60px, .58fr) 32px !important;
  gap: 6px !important;
}
body.workout-mode .active-set-head {
  padding: 0 4px 4px !important;
  border-bottom: 0 !important;
}
body.workout-mode .active-set-head span {
  color: rgba(255,255,255,0.30) !important;
  font-size: 7px !important;
  letter-spacing: 1px !important;
}
body.workout-mode .active-set-line {
  min-height: 38px !important;
  margin: 3px 0 !important;
  padding: 4px 5px !important;
  border: 1px solid rgba(255,255,255,0.065) !important;
  border-radius: 13px !important;
  background: rgba(255,255,255,0.024) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035) !important;
}
body.workout-mode .active-set-line.done {
  margin: 4px 0 !important;
  padding: 4px 5px !important;
  border-color: rgba(77,255,160,0.22) !important;
  background:
    linear-gradient(90deg, rgba(77,255,160,0.18), rgba(77,255,160,0.055)),
    rgba(77,255,160,0.035) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.055),
    0 8px 18px rgba(77,255,160,0.055) !important;
}
body.workout-mode .active-set-label {
  font-size: 11px !important;
  color: rgba(255,255,255,0.74) !important;
}
body.workout-mode .active-set-line.done .active-set-label {
  color: rgba(255,255,255,0.95) !important;
  font-weight: 900;
}
body.workout-mode .active-set-prev-btn,
body.workout-mode .active-set-prev-empty,
body.workout-mode .active-set-input {
  min-height: 28px !important;
  border-radius: 10px !important;
  font-size: 9px !important;
}
body.workout-mode .active-set-prev-btn {
  color: #72dcff !important;
  background: linear-gradient(135deg, rgba(96,212,244,0.13), rgba(96,212,244,0.055)) !important;
  border-color: rgba(96,212,244,0.22) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.055);
}
body.workout-mode .active-set-prev-btn::before {
  content: '↺';
  font-size: 9px;
  opacity: .85;
  transform: translateY(-.5px);
}
body.workout-mode .active-set-input {
  padding: 6px 5px !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  background: rgba(255,255,255,0.035) !important;
  border-color: rgba(255,255,255,0.09) !important;
}
body.workout-mode .active-set-input::placeholder {
  color: rgba(255,255,255,0.30) !important;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}
body.workout-mode .active-set-line.done .active-set-input {
  border-color: rgba(77,255,160,0.18) !important;
  background: rgba(10,34,22,0.34) !important;
}
body.workout-mode .active-set-complete {
  width: 28px !important;
  height: 28px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  background: rgba(255,255,255,0.055) !important;
  border-color: rgba(255,255,255,0.12) !important;
}
body.workout-mode .active-set-complete.done {
  color: #06110b !important;
  background: linear-gradient(135deg, #6cffad, #39f28c) !important;
  box-shadow: 0 0 0 1px rgba(77,255,160,0.22), 0 8px 20px rgba(77,255,160,0.18) !important;
}
body.workout-mode .active-set-complete.pr {
  color: #1c1b03 !important;
  background: linear-gradient(135deg, #f4ff59, #d8ec2e) !important;
  box-shadow: 0 0 0 1px rgba(232,244,77,0.25), 0 8px 22px rgba(232,244,77,0.20) !important;
}
body.workout-mode .active-add-set {
  margin-top: 8px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  color: rgba(255,255,255,0.58) !important;
  border-top: 1px dashed rgba(255,255,255,0.13) !important;
}
@media(max-width:430px){
  body.workout-mode .active-ex-card {
    padding-top: 13px !important;
    padding-bottom: 13px !important;
  }
  body.workout-mode .active-set-head,
  body.workout-mode .active-set-line {
    grid-template-columns: 21px minmax(72px, 1fr) minmax(51px, .64fr) minmax(49px, .58fr) 27px !important;
    gap: 4px !important;
  }
  body.workout-mode .active-set-line {
    min-height: 35px !important;
    padding: 3px 4px !important;
  }
  body.workout-mode .active-set-prev-btn,
  body.workout-mode .active-set-prev-empty,
  body.workout-mode .active-set-input {
    min-height: 26px !important;
    font-size: 8px !important;
  }
  body.workout-mode .active-set-input {
    font-size: 10px !important;
  }
  body.workout-mode .active-set-complete {
    width: 25px !important;
    height: 25px !important;
  }
}
