/* GENERAL */
.gallery-window {
    width: 650px;
    height: 550px;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #666666;
    border-left: 1px solid #666666;
    border-right: 1px solid #666666;
    border-radius: 23px;
    overflow: hidden;
    cursor: move;
    user-select: none;
}

.gallery-window.show {
    display: block;
}

/* CABECERA */
.window-header {
    height: 10%;
    width: 100%;
    background-image: url('../PopupLinks/Assets/barra superior (2).webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 5px;
    font-weight: bold;
    font-size: 16px;
    border: none;
    position: relative;
    box-sizing: border-box;
}

/* CONTROLES DE VENTANA (MIN / MAX / CLOSE) */
.window-controls-group {
    position: absolute;
    right: 15px;
    top: 18px;
    transform: translateY(-50%);
}

/* PIE DE VENTANA / BOTONES */
.gallery-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0px;
    height: 80px;
    width: 100%;
    background: url('assets/inferiorGaleria.webp') no-repeat center center;
    background-size: 100% 100%;
}

/* Estilos de cada botón */
.gallery-footer button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
}

.gallery-footer button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Tamaños individuales de botones */
#zoomBtn,
#gridBtn,
#eliminar {
    height: 25px;
    width: 25px;
}

#rotateIzq,
#rotateDrch {
    height: 25px;
    width: 25px;
}

#prevBtn,
#nextBtn {
    height: 30px;
    width: 45px;
}

#principal {
    height: 45px;
    width: 80px;
}

/* Hover states */
.gallery-footer #prevBtn:hover img {
    content: url("../../componentes/Galeria/assets/Recurso 66.webp");
}

.gallery-footer #nextBtn:hover img {
    content: url("../../componentes/Galeria/assets/Recurso 64.webp");
}

/* CONTENIDO PRINCIPAL */
.gallery-content {
    flex: 1;
    display: flex;
    flex-direction: row;
    background-color: white;
    overflow: hidden;
}

/* VISOR DE IMAGEN */
.image-viewer {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #EDF2F9;
    padding: 10px;
    overflow: hidden;
}

.image-viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity var(--anim-speed, 0.35s) ease;
}


/* PANEL DE INFO A LA DERECHA */
.info-panel {
    width: 150px;
    background: #f8f8f8;
    padding: 0;
    border-left: 1px solid #969696;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
}

.thumbnail-frame {
    width: 100%;
    height: 120px;
    background: linear-gradient(#D5E0EB, #EBE8E6);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.thumbnail-frame img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    margin: 5px;
}

.info {
    padding: 0 10px 10px 10px;
    width: 100%;
    box-sizing: border-box;
}

.info p {
    margin: 0;
    padding: 0px 0px 5px;
    text-align: left;
}

.info p strong {
    color: #808080;
    margin-right: 5px;
}

.date-info,
.artist-info,
.comment-info {
    display: flex;
    align-items: center;
    font-size: 13px;
}

.separator {
    flex-grow: 1;
    border-bottom: 1px solid #808080;
    margin: 0px;
}

.dropdown-icon {
    font-size: 16px;
    margin-left: 5px;
    color: #808080;
}

.date-value,
.artist-value,
.comment-value {
    margin-top: 2px 0;
    font-size: 13px;
}

/* RESPONSIVIDAD PARA MÓVIL */
@media screen and (max-width: 1024px) {
    .gallery-window {
        width: 100% !important;
        height: 100% !important;
        border-radius: 10px;
    }

    .window-header {
        height: 40px !important; /* Altura fija para evitar deformación */
        background-size: cover !important; /* No estirar la imagen de la barra */
    }


    .gallery-content {
        flex-direction: column !important; /* Forzar el cambio a columna */
        overflow-y: auto;
    }

    .image-viewer {
        height: 70% !important; /* Darle mucho más protagonismo a la imagen */
        width: 100% !important;
        background-color: #f0f4f9;
        padding: 5px;
    }

    .info-panel {
        height: auto !important;
        width: 100% !important;
        border-left: none !important;
        border-top: 1px solid #ddd;
        padding: 8px 15px; /* Menos padding lateral */
    }

    .thumbnail-frame {
        display: none !important; /* Ocultar miniatura en móvil para ahorrar espacio */
    }


    .gallery-footer {
        height: auto;
        min-height: 70px;
        flex-wrap: wrap; 
        padding: 5px;
        background-size: cover;
    }

    .gallery-footer button {
        width: auto;
        flex: 1 1 20%;
        height: 35px;
    }

    /* Ocultar todos los botones excepto navegación y principal */
    #zoomBtn, #gridBtn, #rotateIzq, #rotateDrch, #eliminar {
        display: none !important;
    }

    .gallery-footer button {
        width: auto !important;
        flex: 1 !important;
        height: 45px !important;
    }

    #prevBtn, #nextBtn {
        max-width: 60px;
    }

    #principal {
        max-width: 90px;
    }
}