/* Porra v13 · hotfix móvil
 * El CTA de guardar/actualizar debe quedar siempre accesible dentro del modal.
 * Mientras el editor está abierto ocultamos temporalmente el footer propio de Porra,
 * evitando que tape el botón de envío en iPhone y pantallas bajas.
 */

@media (max-width: 860px), (pointer: coarse) {
  body.prediction-hub-mode:has(.prediction-hub-sheet) .prediction-hub-nav {
    display: none !important;
    pointer-events: none !important;
  }

  body.prediction-hub-mode .prediction-hub-sheet {
    z-index: 999 !important;
  }

  body.prediction-hub-mode .prediction-hub-sheet__panel {
    max-height: min(94dvh, 52rem) !important;
    padding-bottom: max(0.9rem, env(safe-area-inset-bottom)) !important;
    scroll-padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  body.prediction-hub-mode .prediction-hub-sheet__form .prediction-score-card {
    padding-bottom: 0.2rem !important;
  }

  body.prediction-hub-mode .prediction-hub-sheet__form .prediction-score-card > .primary-action {
    display: flex !important;
    width: 100% !important;
    min-height: 3.35rem !important;
    align-items: center;
    justify-content: center;
    margin: 0.72rem 0 0 !important;
    border-radius: 0.9rem !important;
    flex: 0 0 auto;
    font-size: 0.82rem !important;
    font-weight: 900 !important;
  }

  @media (max-height: 720px) {
    body.prediction-hub-mode .prediction-hub-sheet__panel {
      max-height: 96dvh !important;
    }

    body.prediction-hub-mode .prediction-hub-sheet__match {
      padding-block: 0.55rem !important;
    }

    body.prediction-hub-mode .prediction-hub-sheet__form {
      margin-top: 0.45rem !important;
    }
  }
}
