/* ============================================================
   MÃ³dulo galerÃ­as â€” perfil de artista (ideofolio)
   ============================================================ */

#galeriaArtista_wrap {
    padding-top: 64px;
    padding-bottom: 64px;
}
#galeriaArtista_wrap h2 {
    font-weight: 700;
    letter-spacing: -.01em;
    color: #1a1a2e;
}

/* ðŸŽ¨ Tabs tipo "pill" flotantes, sin la barra inferior admin de antes */
.qm-galeria-tabs {
    border-bottom: none;
    gap: 6px;
    margin-bottom: 8px;
}
.qm-galeria-tabs .nav-item {
    margin-bottom: 0;
    display: flex;
    align-items: center;
}
.qm-galeria-tabs .nav-link {
    border: none !important;
    border-radius: 999px;
    padding: 9px 20px;
    color: #6b7280;
    background: none !important;
    font-weight: 500;
    font-size: 1.15rem !important;
    transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

a.nav-link.active {}
.qm-galeria-tabs .nav-link:hover {
    color: #6d28d9;
    background-color: #f6f3fd;
    border-color: transparent;
}
.qm-galeria-tabs .nav-link.active {
    color: #fff;
    background: none;
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 -1px 11px rgba(109, 40, 217, .28);
}
.qm-galeria-tabs .nav-link.qm-galeria-add-tab {
    font-weight: 600;
    color: #6d28d9 !important;
    border: 1px dashed #d8cff5;
}
.qm-galeria-tabs .nav-link.qm-galeria-add-tab:hover {
    background-color: #f6f3fd;
    border-color: #6d28d9;
}

/* ðŸ—‘ï¸ Tachito de categorÃ­a: invisible hasta hover del tab, sin ruido visual */
.qm-galeria-tabs .nav-item {
    position: relative;
}
.qm-galeria-tab-eliminar {
    padding: 0 4px;
    margin-left: 2px;
    border: none;
    background: none;
    color: #9ca3af;
    font-size: 12px;
    opacity: 0;
    transition: opacity .15s ease, color .15s ease;
}
.qm-galeria-tabs .nav-item:hover .qm-galeria-tab-eliminar {
    opacity: 1;
}
.qm-galeria-tab-eliminar:hover {
    color: #b91c1c;
}

/* âœï¸ Nombre de categorÃ­a editable con doble clic */
.qm-galeria-tab-editBox {
    cursor: text;
}
.qm-galeria-tab-editBox input {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    padding: 2px 4px;
}

/* ðŸ“¥ Dropzone: mÃ¡s aire, borde suave, sin look de formulario viejo */
.qm-galeria-dropzone {
    border: 1.5px dashed #d9d9e3;
    border-radius: 16px;
    padding: 28px 18px;
    text-align: center;
    color: #9a9aa6;
    font-size: .93rem;
    margin-bottom: 28px;
    background: #fafafc;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.qm-galeria-dropzone i.fa-cloud-upload-alt {
    font-size: 1.15rem;
    color: #b3aee0;
    margin-right: 8px;
}
.qm-galeria-dropzone-hover {
    background: #f6f3fd;
    border-color: #6d28d9;
    color: #6d28d9;
}
.qm-galeria-dropzone-hover i.fa-cloud-upload-alt {
    color: #6d28d9;
}
.qm-galeria-dropzone-subiendo {
    pointer-events: none;
    border-style: solid;
    border-color: #6d28d9;
}

/* Barra de progreso de la subida */
.qm-galeria-progreso-texto {
    color: #6d28d9;
    font-weight: 600;
    margin-bottom: 8px;
}
.qm-galeria-progreso-barra {
    height: 6px;
    border-radius: 999px;
    background: #ece7fa;
    overflow: hidden;
    max-width: 320px;
    margin: 0 auto;
}
.qm-galeria-progreso-barra-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #6d28d9);
    transition: width .2s ease;
}
.qm-galeria-dropzone-link {
    color: #6d28d9;
    text-decoration: underline;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

/* â”€â”€â”€â”€â”€ Drag&drop agrupado en toda la galerÃ­a (incluidos los tabs) â”€â”€â”€â”€â”€ */
.qm-galeria-wrap-dragover {
    outline: 3px dashed #6d28d9;
    outline-offset: -3px;
    background: rgba(109, 40, 217, .03);
    border-radius: 20px;
}
.qm-galeria-tab-drop-hover {
    background: #f6f3fd;
    border-radius: 999px;
}
.qm-galeria-tab-drop-hover .nav-link {
    color: #6d28d9 !important;
    font-weight: 600;
}

.qm-galeria-descargar-zip {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.qm-galeria-descargar-zip-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ececf2;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background: #fff;
    color: #6b7280;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
    transition: color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.qm-galeria-descargar-zip-icon:hover {
    color: #6d28d9;
    border-color: #d8cff5;
    box-shadow: 0 4px 12px rgba(109, 40, 217, .15);
}

/* âš™ï¸ MenÃº de acciones â€” Ã­cono discreto, sin fondo de botÃ³n admin */
.qm-galeria-acciones-grupo > .btn {
    border: 1px solid #ececf2;
    background: #fff;
    color: #6b7280;
    font-size: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
    transition: color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.qm-galeria-acciones-grupo > .btn:hover,
.qm-galeria-acciones-grupo > .btn:focus {
    color: #6d28d9;
    border-color: #d8cff5;
    box-shadow: 0 4px 12px rgba(109, 40, 217, .15);
}
.dropdown-menu {
    border: none;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
    padding: 6px;
}
.qm-galeria-acciones-menu .dropdown-item,
.dropdown-submenu > .dropdown-menu .dropdown-item {
    border-radius: 8px;
    padding: 8px 12px;
    font-size: .9rem;
    color: #374151;
}
.qm-galeria-acciones-menu .dropdown-item:hover,
.dropdown-submenu > .dropdown-menu .dropdown-item:hover {
    background: #f6f3fd;
    color: #6d28d9;
}
.dropdown-submenu {
    position: relative;
}
.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: 4px;
    display: none;
}
.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}
.dropdown-submenu > a.dropdown-toggle::after {
    float: right;
    margin-top: 6px;
    transform: rotate(-90deg);
}

/* ðŸ–¼ï¸ Grid de fotos: tarjetas grandes 4:3, mÃ¡s aire, bordes redondeados */
.qm-galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 16px;
}
.qm-galeria-item {
    position: relative;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    /* border-radius: 16px; */
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 20px rgba(16, 24, 40, .06);
    transition: transform .22s ease, box-shadow .22s ease;
    border: solid white 6px;
}
.qm-galeria-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(16, 24, 40, .06), 0 16px 32px rgba(16, 24, 40, .14);
}

/* Controles sobre la tarjeta: discretos, aparecen con el hover */
.qm-galeria-item-borrar,
.qm-galeria-item-seleccionar {
    opacity: 0;
    transition: opacity .18s ease, background-color .18s ease, transform .18s ease;
}
.qm-galeria-item:hover .qm-galeria-item-borrar,
.qm-galeria-item:hover .qm-galeria-item-seleccionar,
.qm-galeria-item-seleccionada .qm-galeria-item-seleccionar {
    opacity: 1;
}
.qm-galeria-item-borrar {
    position: absolute;
    top: 10px; right: 10px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(20, 20, 26, .55);
    backdrop-filter: blur(2px);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    z-index: 2;
}
.qm-galeria-item-borrar:hover {
    background: #dc2626;
    transform: scale(1.08);
}
.qm-galeria-item-seleccionar {
    position: absolute;
    top: 10px; left: 10px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(20, 20, 26, .45);
    backdrop-filter: blur(2px);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    z-index: 2;
    cursor: pointer;
}
.qm-galeria-item-seleccionar:hover {
    background: rgba(109, 40, 217, .9);
    transform: scale(1.08);
}
.qm-galeria-item-seleccionada {
    outline: 3px solid #6d28d9;
    outline-offset: -3px;
}
.qm-galeria-item-seleccionada .qm-galeria-item-seleccionar {
    background: #6d28d9;
}
.qm-galeria-item-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 22px 12px 10px;
    font-size: .78rem;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, .62), rgba(0, 0, 0, 0));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Skeleton loader mientras carga cada foto */
.qm-galeria-lozad:not(.qm-galeria-item-cargada) {
    background-color: #eef0f4;
    background-image: linear-gradient(90deg, #eef0f4 0%, #f6f7fa 50%, #eef0f4 100%);
    background-size: 200% 100%;
    background-position: -150% 0;
    animation: qmGaleriaSkeleton 1.4s ease-in-out infinite;
}
@keyframes qmGaleriaSkeleton {
    0%   { background-position: -150% 0; }
    100% { background-position: 150% 0; }
}

/* â”€â”€â”€â”€â”€ Lightbox â”€â”€â”€â”€â”€ */
.qm-galeria-lightbox-modal .modal-content {
    border: none;
    border-radius: 18px;
    overflow: hidden;
}
.qm-galeria-lightbox-modal .modal-body {
    position: relative;
    background: #0d0d12;
}
.qm-galeria-lightbox-imgwrap {
    position: relative;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qm-galeria-lightbox-modal img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    border-radius: 4px;
}
.qm-galeria-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(4px);
    color: #fff;
    border: none;
    width: 42px; height: 42px;
    border-radius: 50%;
    z-index: 3;
    transition: background-color .15s ease;
}
.qm-galeria-lightbox-nav:hover {
    background: rgba(255, 255, 255, .25);
}
.qm-galeria-lightbox-prev { left: 14px; }
.qm-galeria-lightbox-next { right: 14px; }
.qm-galeria-lightbox-caption {
    color: #e5e7eb;
    font-size: 1.05em;
    font-weight: 400;
    margin: 16px 24px;
}
.qm-galeria-caption-editable {
    cursor: pointer;
    border-bottom: 1px dashed transparent;
    min-height: 1.3em;
    transition: border-color .15s;
}
.qm-galeria-caption-editable:hover {
    border-color: #6d28d9;
}
.qm-galeria-caption-editable:empty::before {
    content: 'Agregar descripciÃ³n...';
    color: #6b7280;
}

/* â”€â”€â”€â”€â”€ Form de captions post-subida â”€â”€â”€â”€â”€ */
.qm-galeria-caption-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.qm-galeria-caption-row img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(16, 24, 40, .1);
}
