/* Test teórico (test-dgt.php y test-dgt-hacer.php) */
.ap-test-acciones { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 18px; }
.ap-test-accion {
    display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: var(--ap-radio);
    background: var(--ap-superficie); border: 1px solid var(--ap-borde); box-shadow: var(--ap-sombra);
    color: var(--ap-texto-2) !important; text-decoration: none !important; transition: transform .15s, box-shadow .15s;
}
.ap-test-accion:hover { transform: translateY(-2px); box-shadow: var(--ap-sombra-alta); }
.ap-test-accion strong { font-size: 18px; color: var(--ap-texto); }
.ap-test-accion-examen { border-color: var(--ap-acento); box-shadow: inset 4px 0 0 var(--ap-acento), var(--ap-sombra); }
.ap-test-accion-icono svg { width: 28px; height: 28px; color: var(--ap-acento); }
.ap-test-resumen {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px;
}
.ap-test-resumen div { background: var(--ap-superficie); border: 1px solid var(--ap-borde); border-radius: var(--ap-radio); padding: 12px 14px; }
.ap-test-resumen strong { display: block; font-size: 24px; color: var(--ap-marca); }
.ap-test-resumen span { font-size: 13px; color: var(--ap-texto-3); }
.ap-test-temas { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ap-test-temas a {
    display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px 16px; border-radius: var(--ap-radio);
    background: var(--ap-superficie); border: 1px solid var(--ap-borde); text-decoration: none !important; color: var(--ap-texto-2) !important;
}
.ap-test-temas a:hover { border-color: var(--ap-acento); }
.ap-test-temas strong { color: var(--ap-texto); font-size: 16px; }
.ap-test-temas span { font-size: 14px; }
.ap-test-tema-pie { display: flex; justify-content: space-between; margin-top: auto; color: var(--ap-texto-3); }
.ap-test-progreso { display: block; height: 6px; border-radius: 3px; background: var(--ap-borde-suave); overflow: hidden; }
.ap-test-progreso i { display: block; height: 100%; width: 0; background: var(--ap-verde); transition: width .3s; }
.ap-test-borrar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--ap-texto-3); }
.ap-test-nota { margin-top: 18px; }

.ap-test { max-width: 760px; margin: 0 auto; }
.ap-test-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 14px; font-weight: 600; color: var(--ap-texto-2); }
.ap-test-barra .ap-test-progreso { flex: 1 1 100%; order: 3; }
.ap-test-reloj { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.ap-test-reloj svg { width: 16px; height: 16px; }
.ap-test-reloj-fin { color: #b42318; }
.ap-test-pregunta, .ap-test-resultado {
    background: var(--ap-superficie); border: 1px solid var(--ap-borde); border-radius: var(--ap-radio); box-shadow: var(--ap-sombra); padding: 20px;
}
.ap h2.ap-test-enunciado { font-size: 20px; line-height: 1.4; margin: 0 0 16px; }
.ap-test-imagen { display: block; max-width: 100%; max-height: 260px; margin: 0 auto 16px; border-radius: 6px; }
.ap-test-opciones { display: flex; flex-direction: column; gap: 10px; }
.ap-test-opcion {
    display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; padding: 12px 14px; font-size: 16px;
    background: var(--ap-superficie); border: 2px solid var(--ap-borde); border-radius: 8px; color: var(--ap-texto); cursor: pointer;
}
.ap-test-opcion:hover:not(:disabled) { border-color: var(--ap-acento); background: var(--ap-acento-suave); }
.ap-test-opcion:disabled { cursor: default; }
.ap-test-letra {
    flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--ap-superficie-2); border: 1px solid var(--ap-borde); font-weight: 700;
}
.ap-test-elegida { border-color: var(--ap-acento); background: var(--ap-acento-suave); }
.ap-test-elegida .ap-test-letra { background: var(--ap-acento); color: #fff; border-color: var(--ap-acento); }
.ap-test-bien { border-color: var(--ap-verde); background: #edf7f0; }
.ap-test-bien .ap-test-letra { background: var(--ap-verde); color: #fff; border-color: var(--ap-verde); }
.ap-test-mal { border-color: #d64545; background: #fdf0ef; }
.ap-test-mal .ap-test-letra { background: #d64545; color: #fff; border-color: #d64545; }
.ap-test-explicacion { margin-top: 14px; padding: 12px 14px; border-radius: 8px; font-size: 15px; }
.ap-test-explicacion-bien { background: #edf7f0; color: #1f6b38; }
.ap-test-explicacion-mal { background: #fdf0ef; color: #8a2c22; }
.ap-test-pie { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.ap-test-pie .btn-primary { margin-left: auto; }
.ap-test-nota-final { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px 0 18px; }
.ap-test-nota-final strong { font-size: 40px; color: var(--ap-marca); }
.ap-test-apto strong { color: var(--ap-verde); }
.ap-test-no-apto strong { color: #d64545; }
.ap-test-acciones-final { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.ap-test-revision { padding-left: 20px; }
.ap-test-revision li { margin-bottom: 14px; }
.ap-test-revision p { margin: 4px 0 0; font-size: 14px; }
.ap-test-rev-mal { color: #8a2c22; }
.ap-test-rev-bien { color: #1f6b38; font-weight: 600; }
.ap-test-rev-exp { color: var(--ap-texto-2); }
@media (max-width: 600px) { .ap-test-pregunta, .ap-test-resultado { padding: 14px; } .ap h2.ap-test-enunciado { font-size: 18px; } }
