/* ============================================================================
   Pizarra en la app (Cesar 2026-11-01)
   1) Modo app: la app de docentes abre la pizarra web en su WebView. /app-entrar.html deja
      sessionStorage.miceApp = '1' e index.html pone html.mice-app. Ahi la web esconde su menu
      lateral y su barra movil: la navegacion la da la barra de la app.
   2) Dedo: en pantallas tactiles (iPad, tablet, celular) los controles de mover y agrandar
      widgets tienen una zona de toque de 44 px aunque se dibujen chicos.
   Los ajustes de celular en horizontal del editor viven en PizarronEditor.razor.css.
   ============================================================================ */

/* ── 1) Modo app ─────────────────────────────────────────────────────────── */
/* !important: las reglas del layout son CSS aislado (selector + atributo) y ganan en especificidad. */
html.mice-app .app-shell .mobile-topbar,
html.mice-app .app-shell .sidebar-shell {
    display: none !important;
}

html.mice-app .app-shell,
html.mice-app .app-shell.with-aside,
html.mice-app .app-shell.sidebar-collapsed,
html.mice-app .app-shell.sidebar-collapsed.with-aside {
    grid-template-columns: 1fr !important;
    grid-template-rows: 100vh !important;
}

html.mice-app .app-shell .main-shell {
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
}

/* El WebView no debe hacer zoom de texto ni "rebotar" la pagina completa al arrastrar widgets. */
html.mice-app,
html.mice-app body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overscroll-behavior: none;
}

/* Sin resaltado gris de Android/iOS al tocar botones. */
html.mice-app * {
    -webkit-tap-highlight-color: transparent;
}

/* ── 2) Dedo ─────────────────────────────────────────────────────────────── */
@media (pointer: coarse) {
    /* Zona de toque invisible alrededor de cada asa: el asa se ve igual, el dedo atina. */
    .handle::after {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        width: 44px;
        height: 44px;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        background: transparent;
    }

    /* La flechita de girar es mas grande y se separa del widget. */
    .handle.rotate {
        width: 30px !important;
        height: 30px !important;
        top: -42px !important;
    }
}
