/* ═══════════════════════════════════════════════════════════════════════════
   RAVVO — v98 (18/10/2026) · WOD POR HORÁRIO
   Aba "Aulas do dia" do Construtor, chips de "Horários" no cabeçalho da aula e
   lista por horário em Treinos/Home do aluno. Só tokens do global.css (tema).
   ═══════════════════════════════════════════════════════════════════════════ */

/* na lista não há aula aberta: some o que é do editor */
.wp-na-lista .wp-btn-draft, .wp-na-lista .wp-btn-publish,
.wp-na-lista .wp-preview-toggle, .wp-na-lista #wp-savestate { display: none; }

.wh-dia { max-width: 760px; }
.wh-dia-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.wh-dia-head h3 { margin: 0; font-family: var(--font-display, sans-serif); font-size: 1.15rem; }
.wh-dia-head small { color: var(--text-secondary); text-transform: capitalize; }
.wh-add {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--accent, #8B3FE8); background: var(--accent-dim, rgba(139,63,232,.12));
  color: var(--accent, #8B3FE8); font-weight: 600; font-size: .85rem;
}
.wh-add span { font-size: 1rem; line-height: 1; }
.wh-aviso { font-size: .8rem; color: var(--warning); background: var(--warning-dim); padding: 8px 12px; border-radius: 8px; margin-bottom: 12px; }

.wh-card {
  border: 1px solid var(--border, #222); border-left: 4px solid var(--wh-cor, var(--accent));
  border-radius: 14px; background: var(--bg-card, #161616); margin-bottom: 10px; overflow: hidden;
}
.wh-card.vazio { border-left-style: dashed; opacity: .85; }
.wh-card-main {
  display: grid; grid-template-columns: 74px 34px 1fr 18px; align-items: center; gap: 10px; width: 100%;
  padding: 14px 14px 10px; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; font: inherit;
}
.wh-hora b { display: block; font-family: var(--font-display, sans-serif); font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }
.wh-hora b.wh-sem { font-size: .95rem; color: var(--text-secondary); }
.wh-hora small { color: var(--text-muted); font-size: .72rem; white-space: nowrap; }
.wh-ic { font-size: 1.45rem; text-align: center; }
.wh-info { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.wh-info b { font-size: .95rem; color: var(--text-primary); }
.wh-tit { font-size: .82rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-info small { font-size: .78rem; color: var(--text-muted); }
.wh-chev { font-size: 1.4rem; color: var(--text-muted); }
.wh-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.wh-tag { font-size: .66rem; padding: 2px 8px; border-radius: 100px; background: var(--bg-input, #222); color: var(--text-secondary); }
.wh-tag.geral { background: var(--info-dim, rgba(59,130,246,.15)); color: var(--info, #3b82f6); }
.wh-tag.comp  { background: var(--accent-dim, rgba(139,63,232,.15)); color: var(--accent, #8B3FE8); }
.wh-tag.rasc  { background: var(--warning-dim); color: var(--warning); }
.wh-acoes { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 12px 98px; }
.wh-acoes button {
  font-size: .76rem; padding: 5px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border, #222); background: transparent; color: var(--text-secondary);
}
.wh-acoes button:hover { border-color: var(--accent); color: var(--text-primary); }
.wh-acoes button.add { border-style: dashed; border-color: var(--accent); color: var(--accent); }

/* chips "Horários" do Construtor */
.wh-horarios { margin-top: 10px; }
.wh-horarios-lbl { font-size: .78rem; color: var(--text-secondary); margin-bottom: 6px; }
.wh-horarios-lbl small { color: var(--text-muted); margin-left: 6px; }
.wh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wh-chip {
  display: flex; flex-direction: column; align-items: flex-start; min-width: 74px; padding: 6px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border, #222); background: var(--bg-input, #1c1c1c); color: var(--text-primary); font: inherit;
}
.wh-chip b { font-size: .9rem; }
.wh-chip small { font-size: .66rem; color: var(--text-muted); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-chip.on { border-color: var(--accent, #8B3FE8); background: var(--accent-dim, rgba(139,63,232,.15)); box-shadow: inset 0 0 0 1px var(--accent, #8B3FE8); }
.wh-chip.on small { color: var(--accent, #8B3FE8); }
.wh-chip:disabled { opacity: .4; cursor: not-allowed; }

/* "Ver treino" (no <body>) */
.wh-ver-ov { position: fixed; inset: 0; z-index: 10050; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; }
.wh-ver {
  width: 100%; max-width: 520px; max-height: 88vh; overflow: auto; background: var(--bg-card, #161616);
  color: var(--text-primary); border-radius: 18px 18px 0 0; padding: 16px;
}
@media (min-width: 700px) { .wh-ver-ov { align-items: center; } .wh-ver { border-radius: 18px; } }
.wh-ver-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.wh-ver-head b { display: block; font-size: 1.05rem; }
.wh-ver-head small { color: var(--text-secondary); font-size: .8rem; }
.wh-ver-x { background: none; border: 0; color: var(--text-secondary); font-size: 1.1rem; cursor: pointer; }
.wh-ver-notes { font-size: .85rem; color: var(--text-secondary); margin: 0 0 10px; }
.wh-ver-acoes { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

/* ── aluno: Treinos / Home por horário ── */
.sh-dia-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.sh-dia-nav .tit { flex: 1; min-width: 0; }
.sh-dia-nav .tit b { display: block; font-family: var(--font-display, sans-serif); font-size: 1.1rem; }
.sh-dia-nav .tit small { color: var(--text-secondary); font-size: .82rem; text-transform: capitalize; }
.sh-dia-nav { position: relative; }
.sh-dia-nav > button {
  flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border, #222); background: var(--bg-card, #161616); color: var(--text-primary); font-size: 1rem; padding: 0;
}
/* o v8-mobile-hotfix alarga todo input no celular: o seletor de data fica escondido e abre pelo 📅 */
.sh-dia-nav .sh-dia-input { position: absolute !important; right: 0; bottom: 0; width: 1px !important; height: 1px !important;
  min-width: 0 !important; opacity: 0; pointer-events: none; border: 0 !important; padding: 0 !important; }
.sh-aula { margin-bottom: 10px; }
.sh-aula .wh-card-main { grid-template-columns: 66px 32px 1fr 18px; }
.sh-aula.aberta .wh-chev { transform: rotate(90deg); }
.sh-aula-corpo { padding: 0 12px 12px; }
.sh-aula-corpo .wod-card { margin: 0; border: 0; padding: 0; background: transparent; box-shadow: none; }
.sh-home-horarios { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; }
.sh-home-horarios div { display: flex; gap: 10px; align-items: baseline; font-size: .84rem; padding: 6px 10px; background: var(--bg-input); border-radius: var(--radius-sm, 6px); }
.sh-home-horarios b { font-family: var(--font-display, sans-serif); min-width: 44px; }
.sh-home-horarios span { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 600px) {
  .wh-card-main { grid-template-columns: 62px 28px 1fr 14px; gap: 8px; padding: 12px 12px 8px; }
  .wh-hora b { font-size: 1.1rem; }
  .wh-acoes { padding: 0 12px 10px 12px; }
  .wh-dia-head h3 { font-size: 1.05rem; }
}

/* v98b — turmas simultâneas: grupo por horário, chips por turma, aviso de coach */
.wh-grupo { margin-bottom: 6px; }
.wh-grupo-hora { display: flex; align-items: baseline; gap: 8px; margin: 14px 2px 8px; }
.wh-grupo-hora b { font-family: var(--font-display, sans-serif); font-size: 1rem; color: var(--text-primary); }
.wh-grupo-hora small { font-size: .75rem; color: var(--text-muted); }
.wh-tag.coach { background: var(--warning-dim); color: var(--warning); white-space: normal; }
.wh-chip-grupo { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 6px; }
.wh-chip-hora { flex: 0 0 46px; font-weight: 700; font-size: .85rem; padding-top: 8px; color: var(--text-primary); }
.wh-chip-grupo .wh-chips { flex: 1; min-width: 0; }
.wh-chip-turma { min-width: 0; max-width: 100%; }
.wh-chip-turma b { font-size: .8rem; }
.wh-chip-turma span { font-size: .72rem; color: var(--text-secondary); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-chip-turma small { max-width: 150px; }
.wh-acoes button.del { margin-left: auto; }
.wh-acoes button.del:hover { border-color: var(--danger, #e5484d); color: var(--danger, #e5484d); }
.wh-ver-del { margin-right: auto; color: var(--danger, #e5484d) !important; }
