/* ==========================================================================
   Yo-Yo Intermittent Recovery Test, Level 1 (Yo-Yo IR1)
   Interactive pacing module for Health-calc.com
   All rules scoped under .yyir1 so the module never collides with the
   surrounding Joomla template styles.
   ========================================================================== */

.yyir1,
.yyir1 * {
  box-sizing: border-box;
}

.yyir1 {
  --yy-bg: #ffffff;
  --yy-panel: #f5f8fb;
  --yy-panel-2: #eaf0f6;
  --yy-line: #d8e1ea;
  --yy-text: #1e2b3a;
  --yy-muted: #5f7183;
  --yy-accent: #0d9488;
  --yy-accent-2: #d97706;
  --yy-run: #0f766e;
  --yy-rec: #d97706;
  --yy-cone: #f97316;
  --yy-pitch: #3ba566;
  --yy-pitch-2: #2f8f57;
  --yy-danger: #dc2626;

  max-width: 760px;
  margin: 0 auto;
  color: var(--yy-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.yyir1 .yy-card {
  background: var(--yy-bg);
  border: 1px solid var(--yy-line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(30, 43, 58, 0.1);
}

.yyir1 .yy-title {
  margin: 0 0 2px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.yyir1 .yy-subtitle {
  margin: 0 0 14px;
  color: var(--yy-muted);
  font-size: 0.9rem;
}

/* ---- Scoreboard -------------------------------------------------------- */

.yyir1 .yy-scoreboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.yyir1 .yy-stat {
  background: var(--yy-panel);
  border: 1px solid var(--yy-line);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}

.yyir1 .yy-stat .yy-stat-label {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--yy-muted);
  margin-bottom: 4px;
}

.yyir1 .yy-stat .yy-stat-value {
  display: block;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.1;
}

.yyir1 .yy-stat .yy-stat-sub {
  display: block;
  font-size: 0.68rem;
  color: var(--yy-muted);
  margin-top: 2px;
}

/* ---- Team test --------------------------------------------------------- */

.yyir1 .yy-team {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--yy-line);
  border-radius: 12px;
  background: var(--yy-panel);
}
.yyir1 .yy-team[hidden] {
  display: none;
}
.yyir1 .yy-team h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}
.yyir1 .yy-team-hint {
  font-size: 0.8rem;
  color: var(--yy-muted);
  margin: 0 0 10px;
}
.yyir1 .yy-team-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.yyir1 .yy-team-inputs input {
  flex: 0 1 220px;
  padding: 9px 12px;
  border: 1px solid var(--yy-line);
  border-radius: 8px;
  font: inherit;
  color: var(--yy-text);
  background: #ffffff;
}
.yyir1 .yy-team-inputs input:focus {
  outline: 2px solid var(--yy-accent);
  outline-offset: 1px;
  border-color: var(--yy-accent);
}
.yyir1 .yy-team-names {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.yyir1 button.yy-name-btn {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--yy-accent);
  background: var(--yy-accent);
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.yyir1 button.yy-name-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}
.yyir1 button.yy-name-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.yyir1 button.yy-name-btn.yy-done {
  border-color: var(--yy-line);
  background: var(--yy-panel-2);
  color: var(--yy-muted);
  text-decoration: line-through;
  opacity: 1;
}
.yyir1 .yy-team-results {
  margin-top: 12px;
  border-top: 1px solid var(--yy-line);
  padding-top: 10px;
}
.yyir1 .yy-team-results[hidden] {
  display: none;
}
.yyir1 .yy-team-results ol {
  margin: 6px 0 12px;
  padding-left: 22px;
  font-size: 0.92rem;
}
.yyir1 .yy-team-results li {
  margin: 3px 0;
  font-variant-numeric: tabular-nums;
}
.yyir1 button.yy-btn.yy-btn-small {
  padding: 8px 14px;
  font-size: 0.9rem;
}

/* ---- Track ------------------------------------------------------------- */

.yyir1 .yy-track-wrap {
  background: var(--yy-panel);
  border: 1px solid var(--yy-line);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 14px;
}

.yyir1 .yy-track {
  display: block;
  width: 100%;
  height: auto;
}

.yyir1 .yy-beep-flash {
  opacity: 0;
}

/* ---- Controls ---------------------------------------------------------- */

.yyir1 .yy-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}

.yyir1 button.yy-btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: #ffffff;
  background: var(--yy-accent);
  transition: transform 0.05s ease, filter 0.15s ease, background 0.15s ease;
}

.yyir1 button.yy-btn:hover {
  filter: brightness(1.06);
}
.yyir1 button.yy-btn:active {
  transform: translateY(1px);
}

.yyir1 button.yy-btn.yy-btn-stop {
  background: var(--yy-danger);
  color: #fff;
}

.yyir1 button.yy-btn.yy-btn-ghost {
  background: transparent;
  color: var(--yy-text);
  border: 1px solid var(--yy-line);
}

.yyir1 button.yy-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.yyir1 .yy-sound {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--yy-muted);
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.yyir1 .yy-sound input {
  width: 16px;
  height: 16px;
  accent-color: var(--yy-accent);
}

/* ---- Result ------------------------------------------------------------ */

.yyir1 .yy-result {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--yy-line);
  background: var(--yy-panel-2);
}

.yyir1 .yy-result[hidden] {
  display: none;
}

.yyir1 .yy-result h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.yyir1 .yy-result .yy-result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}

.yyir1 .yy-result .yy-result-cell {
  text-align: center;
}
.yyir1 .yy-result .yy-result-cell b {
  display: block;
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
}
.yyir1 .yy-result .yy-result-cell span {
  font-size: 0.72rem;
  color: var(--yy-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.yyir1 .yy-result .yy-note {
  font-size: 0.78rem;
  color: var(--yy-muted);
  margin: 6px 0 0;
}

/* ---- Description / instructions --------------------------------------- */

.yyir1 .yy-info {
  margin-top: 16px;
}

.yyir1 .yy-info details {
  border: 1px solid var(--yy-line);
  border-radius: 12px;
  background: var(--yy-panel);
  margin-bottom: 10px;
  overflow: hidden;
}

.yyir1 .yy-info summary {
  cursor: pointer;
  padding: 12px 16px;
  font-weight: 600;
  list-style: none;
}
.yyir1 .yy-info summary::-webkit-details-marker {
  display: none;
}
.yyir1 .yy-info summary::after {
  content: "+";
  float: right;
  color: var(--yy-muted);
  font-weight: 700;
}
.yyir1 .yy-info details[open] summary::after {
  content: "\2212";
}

.yyir1 .yy-info .yy-info-body {
  padding: 0 16px 14px;
  color: var(--yy-text);
  font-size: 0.92rem;
}

.yyir1 .yy-info .yy-info-body p {
  margin: 8px 0;
}

.yyir1 .yy-info .yy-info-body ol,
.yyir1 .yy-info .yy-info-body ul {
  margin: 8px 0;
  padding-left: 20px;
}

.yyir1 .yy-info .yy-info-body li {
  margin: 4px 0;
}

.yyir1 .yy-info .yy-info-body a {
  color: var(--yy-accent);
}

.yyir1 table.yy-levels {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 6px 0 2px;
}
.yyir1 table.yy-levels th,
.yyir1 table.yy-levels td {
  border-bottom: 1px solid var(--yy-line);
  padding: 6px 8px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.yyir1 table.yy-levels th {
  color: var(--yy-muted);
  font-weight: 600;
  text-align: right;
}
.yyir1 table.yy-levels th:first-child,
.yyir1 table.yy-levels td:first-child {
  text-align: left;
}

.yyir1 .yy-refs {
  font-size: 0.78rem;
  color: var(--yy-muted);
  margin-top: 6px;
}
.yyir1 .yy-refs p {
  margin: 4px 0;
}

/* ---- Responsive -------------------------------------------------------- */

@media (max-width: 540px) {
  .yyir1 .yy-scoreboard {
    grid-template-columns: repeat(2, 1fr);
  }
  .yyir1 .yy-stat .yy-stat-value {
    font-size: 1.3rem;
  }
  .yyir1 button.yy-btn {
    flex: 1 1 auto;
  }
  .yyir1 .yy-sound {
    margin-left: 0;
    flex-basis: 100%;
    justify-content: flex-end;
  }
}
