/* BidiPic - Animacion de carga "Generando bidipic..." (28/9/2026)
   El obturador gira despacio y los petalos aparecen uno por segundo; con la flor
   completa se mantiene un momento, se desvanece entera y el ciclo (11 s) vuelve a empezar.
   Imagenes de 400x400 con el centro del obturador en el 49.85% / 48.4%. */
.bp-carga {
    position: relative;
    display: block;
    width: 128px;
    height: 128px;
    margin: 0 auto 14px;
}
.bp-carga img,
.bp-carga .bp-carga-p {
    position: absolute;
    inset: 0;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    transform-origin: 49.85% 48.4%;
}
.bp-carga .bp-carga-p { transform: rotate(calc(var(--i) * 45deg)); }
.bp-carga .bp-carga-p img {
    opacity: 0;
    transform: scale(.85);
    animation-duration: 11s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}
.bp-carga .bp-carga-o { z-index: 2; animation: bpCargaGiro 6s linear infinite; }
.bp-carga .bp-carga-p:nth-child(1) { --i: 0; }
.bp-carga .bp-carga-p:nth-child(1) img { animation-name: bpCargaP0; }
.bp-carga .bp-carga-p:nth-child(2) { --i: 1; }
.bp-carga .bp-carga-p:nth-child(2) img { animation-name: bpCargaP1; }
.bp-carga .bp-carga-p:nth-child(3) { --i: 2; }
.bp-carga .bp-carga-p:nth-child(3) img { animation-name: bpCargaP2; }
.bp-carga .bp-carga-p:nth-child(4) { --i: 3; }
.bp-carga .bp-carga-p:nth-child(4) img { animation-name: bpCargaP3; }
.bp-carga .bp-carga-p:nth-child(5) { --i: 4; }
.bp-carga .bp-carga-p:nth-child(5) img { animation-name: bpCargaP4; }
.bp-carga .bp-carga-p:nth-child(6) { --i: 5; }
.bp-carga .bp-carga-p:nth-child(6) img { animation-name: bpCargaP5; }
.bp-carga .bp-carga-p:nth-child(7) { --i: 6; }
.bp-carga .bp-carga-p:nth-child(7) img { animation-name: bpCargaP6; }
.bp-carga .bp-carga-p:nth-child(8) { --i: 7; }
.bp-carga .bp-carga-p:nth-child(8) img { animation-name: bpCargaP7; }
@keyframes bpCargaP0 {
    0% { opacity: 0; transform: scale(.85); }
    5.45%, 83.64% { opacity: 1; transform: scale(1); }
    89.09%, 100% { opacity: 0; transform: scale(.85); }
}
@keyframes bpCargaP1 {
    0%, 9.09% { opacity: 0; transform: scale(.85); }
    14.55%, 83.64% { opacity: 1; transform: scale(1); }
    89.09%, 100% { opacity: 0; transform: scale(.85); }
}
@keyframes bpCargaP2 {
    0%, 18.18% { opacity: 0; transform: scale(.85); }
    23.64%, 83.64% { opacity: 1; transform: scale(1); }
    89.09%, 100% { opacity: 0; transform: scale(.85); }
}
@keyframes bpCargaP3 {
    0%, 27.27% { opacity: 0; transform: scale(.85); }
    32.73%, 83.64% { opacity: 1; transform: scale(1); }
    89.09%, 100% { opacity: 0; transform: scale(.85); }
}
@keyframes bpCargaP4 {
    0%, 36.36% { opacity: 0; transform: scale(.85); }
    41.82%, 83.64% { opacity: 1; transform: scale(1); }
    89.09%, 100% { opacity: 0; transform: scale(.85); }
}
@keyframes bpCargaP5 {
    0%, 45.45% { opacity: 0; transform: scale(.85); }
    50.91%, 83.64% { opacity: 1; transform: scale(1); }
    89.09%, 100% { opacity: 0; transform: scale(.85); }
}
@keyframes bpCargaP6 {
    0%, 54.55% { opacity: 0; transform: scale(.85); }
    60%, 83.64% { opacity: 1; transform: scale(1); }
    89.09%, 100% { opacity: 0; transform: scale(.85); }
}
@keyframes bpCargaP7 {
    0%, 63.64% { opacity: 0; transform: scale(.85); }
    69.09%, 83.64% { opacity: 1; transform: scale(1); }
    89.09%, 100% { opacity: 0; transform: scale(.85); }
}
@keyframes bpCargaGiro { to { transform: rotate(360deg); } }
/* El logo animado sustituye al circulo de carga antiguo */
#loadingvid2:has(.bp-carga) > img[src*="loading.gif"],
#loadingvid2:has(.bp-carga) > br { display: none; }
@media (prefers-reduced-motion: reduce) {
    .bp-carga .bp-carga-p img { animation: none; opacity: 1; transform: none; }
    .bp-carga .bp-carga-o { animation: none; }
}
/* Cierre al terminar la generacion: la flor se completa encima de la pantalla final (bp_carga.js) */
#bp_carga_fin { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; background: rgba(10,13,20,.72); opacity: 1; transition: opacity .35s ease; }
#bp_carga_fin.sale { opacity: 0; }
#bp_carga_fin .bp-carga { margin: 0; }
.bp-carga-cierre .bp-carga-p img { animation: none !important; opacity: 0; transform: scale(.85); transition: opacity .3s ease-out, transform .3s ease-out; }
.bp-carga-cierre .bp-carga-p img.on { opacity: 1; transform: scale(1); }
