/*
 * Arquivo: assets/css/app.css
 * Ajustes visuais do aplicativo
 * Complementa o visual com o indicador de "puxar para atualizar", a proteção dos treinos contra cópia e impressão,
 * a marca d'água com os dados do atleta e o estilo das notas dentro dos treinos.
 */

html, body { overscroll-behavior-y: contain; -webkit-tap-highlight-color: transparent; }
body { padding-bottom: env(safe-area-inset-bottom); }

/* ---------- Puxar para atualizar ---------- */
#ptr-indicador {
  position: fixed; left: 50%; top: 0; z-index: 60;
  width: 44px; height: 44px; margin-left: -22px; border-radius: 9999px;
  background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.18);
  display: grid; place-items: center;
  transform: translateY(-60px); opacity: 0; pointer-events: none;
}
#ptr-indicador .ptr-roda {
  width: 22px; height: 22px; border-radius: 9999px;
  border: 3px solid #fed7aa; border-top-color: #ea580c;
}
#ptr-indicador.carregando .ptr-roda { animation: ptr-gira .7s linear infinite; }
@keyframes ptr-gira { to { transform: rotate(360deg); } }

/* ---------- Proteção do conteúdo dos treinos ---------- */
body.protegido .conteudo-protegido {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
body.protegido.oculto .conteudo-protegido { filter: blur(18px); }
.marca-dagua {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5;
  background-repeat: repeat;
}
@media print {
  body * { display: none !important; }
  body::after { content: "Impressão não permitida."; display: block !important; font: 20px sans-serif; padding: 40px; }
}

/* ---------- Texto do treino ---------- */
.texto-treino blockquote {
  border-left: 4px solid #f97316; background: #fff7ed; color: #7c2d12;
  border-radius: 0 .75rem .75rem 0; padding: .75rem 1rem; font-style: normal; quotes: none;
}
.texto-treino blockquote::before {
  content: "Nota"; display: block; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: #ea580c; margin-bottom: .25rem;
}
.texto-treino blockquote p::before, .texto-treino blockquote p::after { content: none; }
.texto-treino em { color: #64748b; }
.texto-treino strong em, .texto-treino em strong { color: inherit; }

/* estrelas da avaliação */
.estrelas { display: inline-flex; flex-direction: row-reverse; gap: .25rem; }
.estrelas input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.estrelas label { cursor: pointer; color: #cbd5e1; font-size: 2.5rem; line-height: 1; }
.estrelas input:checked ~ label, .estrelas label:hover, .estrelas label:hover ~ label { color: #f59e0b; }
.estrelas input:focus-visible + label { outline: 2px solid #ea580c; border-radius: 4px; }

/* ---------- Janelas de mensagem ---------- */
.modal-mensagem { animation: modal-fundo .2s ease-out; }
.modal-mensagem .modal-caixa { animation: modal-entra .28s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes modal-fundo { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-entra { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .modal-mensagem, .modal-mensagem .modal-caixa { animation: none; }
}
