/* ==========================================================================
   Biblia Adentro · App Web · Academia en modo app (Fase 4)
   --------------------------------------------------------------------------
   Ajustes de la Academia dentro del shell. Sólo se cargan cuando la pestaña
   activa es Academia (html.app-mode). El escritorio no cambia.
   ========================================================================== */

/* ------------------------------ Base ------------------------------------- */
html.app-mode .ac-body { background: var(--ba-bg); }
html.app-mode .ac-section { padding: 22px 16px !important; }
html.app-mode .ac-section h2 { font-size: 1.35rem; }
html.app-mode .ac-aula-hero {
    padding: calc(var(--ba-appbar-total) + 16px) 16px 20px !important;
    border-radius: 0 0 20px 20px;
}
html.app-mode .ac-aula-hero h1 { font-size: 1.5rem; }
html.app-mode .ac-aula-hero p { font-size: .92rem; }
html.app-mode .ac-dash-grid { grid-template-columns: 1fr !important; gap: 16px; }
html.app-mode .ac-panel { border-radius: 14px; padding: 16px; }
html.app-mode .ac-course { border-radius: 14px; }
html.app-mode .ac-course-img { height: 150px; }
html.app-mode .ac-course-body { padding: 14px 15px; }
html.app-mode .ac-btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
html.app-mode .ac-btn-sm { min-height: 36px; }
html.app-mode .ac-empty { padding: 26px 14px; }
html.app-mode .ac-quick { margin-top: 4px; }

/* Hero / cabeceras de las páginas públicas de Academia */
html.app-mode .ac-body .hero,
html.app-mode .ac-body .ac-hero {
    padding-top: calc(var(--ba-appbar-total) + 18px) !important;
    padding-bottom: 22px !important;
}
html.app-mode .ac-body .hero h1,
html.app-mode .ac-body .ac-hero h1 { font-size: 1.7rem !important; line-height: 1.2; }

/* ------------------------------ Ingreso / registro ----------------------- */
html.app-mode body.ac-login-page,
html.app-mode body.ac-register-page {
    height: auto !important;
    min-height: 100dvh;
    overflow: auto !important;
    display: block !important;
    animation: none !important;
    background: var(--ba-bg) !important;
    padding: calc(var(--ba-appbar-total) + 18px) 16px calc(var(--ba-tabbar-total) + 26px) !important;
}
html.app-mode body.ac-login-page #particles-js,
html.app-mode body.ac-register-page #particles-js { display: none !important; }

html.app-mode body.ac-login-page .login-box,
html.app-mode body.ac-register-page .register-box {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 20px;
    border-radius: 16px;
    box-shadow: 0 16px 38px -22px rgba(16, 26, 39, .45);
    background: #fff;
}
html.app-mode body.ac-login-page .login-box h2,
html.app-mode body.ac-register-page .register-box h2 { font-size: 1.35rem; }
html.app-mode body.ac-login-page .logo-container img,
html.app-mode body.ac-register-page .logo-container img { max-width: 150px; }
html.app-mode body.ac-login-page input,
html.app-mode body.ac-register-page input {
    width: 100% !important;
    min-height: 46px;
    font-size: 16px !important;
    border-radius: 10px !important;
}
html.app-mode body.ac-login-page button,
html.app-mode body.ac-register-page button {
    min-height: 48px;
    border-radius: 11px;
    font-size: 16px !important;
}
html.app-mode body.ac-login-page .register-link,
html.app-mode body.ac-register-page .login-link { margin-top: 18px; font-size: 14px; }
html.app-mode body.ac-register-page .benefits { margin-top: 16px; font-size: 13px; }
html.app-mode body.ac-register-page .input-group { margin-bottom: 12px; }

/* ------------------------------ Lección --------------------------------- */
html.app-mode .top-bar { display: none !important; }
html.app-mode .nav-lessons {
    background: #fff;
    border-bottom: 1px solid var(--ba-line);
    padding: 6px 0;
}
html.app-mode .nav-lessons .container { padding: 0 12px; max-width: 100%; }
html.app-mode .course-title { font-size: 12.5px; margin-bottom: 6px; }
html.app-mode .lesson-nav { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
html.app-mode .lesson-nav a,
html.app-mode .lesson-nav span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 38px;
    padding: 7px 12px;
    border-radius: 9px;
    font-size: 12.5px;
}
html.app-mode .main-content { padding: 12px 0 calc(var(--ba-tabbar-total) + 96px) !important; }
html.app-mode .main-content .container { padding: 0 12px; max-width: 100%; }
html.app-mode .video-container { width: 100% !important; }
html.app-mode .video-container iframe,
html.app-mode .video-container video {
    width: 100% !important;
    aspect-ratio: 16 / 9;
    height: auto !important;
}
html.app-mode .lesson-title { font-size: 21px !important; line-height: 1.25; margin: 12px 0 8px; }
html.app-mode .tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
html.app-mode .tab-btn { min-height: 42px; flex: 0 0 auto; padding: 8px 13px; font-size: 12.5px; }
html.app-mode .text-content { font-size: 16px; line-height: 1.7; }
html.app-mode .text-content img { max-width: 100%; height: auto; }
html.app-mode .col-sidebar { margin-top: 16px; }
html.app-mode .resources-sidebar { border-radius: 14px; }
html.app-mode .pdf-viewer { height: 55vh !important; }
html.app-mode .quiz-container { padding: 14px !important; }
html.app-mode .quiz-options label { min-height: 44px; display: flex; align-items: center; gap: 9px; font-size: 14.5px; }
html.app-mode .btn-quiz { min-height: 44px; }
html.app-mode .btn-complete {
    position: sticky;
    bottom: calc(var(--ba-tabbar-total) + 10px);
    z-index: 6;
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    margin-top: 16px;
}

/* ------------------------------ Varios ---------------------------------- */
html.app-mode .ac-progress { height: 8px; border-radius: 999px; }
html.app-mode .ac-badge { font-size: 10px; }
html.app-mode .ac-stat .ac-num-big { font-size: 1.5rem; }
html.app-mode .ac-quick .ac-btn { width: 100%; margin-bottom: 8px; }

@media (max-width: 380px) {
    html.app-mode .ac-section { padding: 18px 12px !important; }
    html.app-mode .lesson-title { font-size: 19px !important; }
}

/* ------------------------------ Mostrar contraseña ---------------------- */
html.app-mode .ba-clave { position: relative; display: block; width: 100%; }
html.app-mode .ba-clave input { padding-right: 46px !important; }
html.app-mode .ba-clave-grupo { position: relative; }
html.app-mode .ba-clave-grupo input { padding-right: 46px !important; }
html.app-mode .ba-ver-clave {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
}
html.app-mode .ba-ver-clave svg { width: 21px; height: 21px; }
html.app-mode .ba-ver-clave:hover,
html.app-mode .ba-ver-clave.is-visible { color: var(--ba-accent-ink); background: var(--ba-accent-soft); }
html.app-mode .ba-ver-clave:focus-visible { outline: 2px solid var(--ba-accent); outline-offset: 2px; }

/* ------------------------------ Guardar lección ------------------------- */
html.app-mode .ba-guardar-leccion {
    width: 100%;
    min-height: 44px;
    margin: 0 0 14px;
    padding: 10px 16px;
    border: 1px solid var(--ba-linea, #e6ddcf);
    border-radius: 12px;
    background: #fff;
    color: #6b4a2f;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}
html.app-mode .ba-guardar-leccion.is-on {
    background: var(--ba-accent-soft, #f6e6da);
    border-color: var(--ba-accent, #c26a3d);
    color: var(--ba-accent-ink, #a8562e);
}

