/* ============================================
   Photo Modal Actions (download, link, cart)
   ============================================ */

.photo-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.photo-modal-actions .btn {
    padding: 10px 14px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.2s;
    text-align: center;
    width: 100%;
}

.photo-modal-actions .btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.photo-modal-actions .btn.btn-primary {
    background: var(--primary);
    color: var(--primary-text);
    border-color: var(--primary);
}

.photo-modal-actions .btn.btn-primary:hover {
    background: var(--primary-hover);
}

.photo-modal-actions .modal-cart-action {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.photo-description,
.photo-tags,
.photo-camera-info,
.photo-directory {
    margin-bottom: 14px;
}

/* Fullscreen button on photo */
.btn-fullscreen {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.4rem;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-fullscreen:hover {
    background: var(--primary);
}

.photo-modal-image img {
    cursor: zoom-in;
}

/* ============================================
   Fullscreen Photo Viewer
   ============================================ */

.fullscreen-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 15000;
    align-items: center;
    justify-content: center;
}

.fullscreen-viewer.show {
    display: flex;
}

.fullscreen-viewer-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    overflow: hidden;
}

.fullscreen-viewer-content img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    transition: transform 0.15s ease;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}

.fullscreen-zoom-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.fullscreen-zoom-hint.show {
    opacity: 1;
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.8rem;
    transition: background 0.2s;
}

.fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.fullscreen-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 2.2rem;
    transition: background 0.2s;
}

.fullscreen-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.fullscreen-prev {
    left: 24px;
}

.fullscreen-next {
    right: 24px;
}

/* sin flecha anterior en la primera foto ni siguiente en la última, en la ventana
   de la foto y en el visor a pantalla completa */
.fullscreen-nav.fin-galeria,
.nav-arrow.fin-galeria {
    display: none;
}

/* Contador de posición en la galería (3 / 30): texto blanco sobre una
   pastilla oscura translúcida con borde gris claro, legible sobre cualquier foto */
.contador-fotos {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    padding: 3px 11px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(203, 213, 225, 0.75);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    user-select: none;
}
.contador-fotos:empty { display: none; }

/* Search results container */
.search-results-container {
    display: block;
}

/* ============================================
   Bulk Select for Search Results
   ============================================ */

.bulk-actions-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--primary-light);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.bulk-actions-bar .btn-select-all {
    padding: 6px 14px;
    font-size: 0.85rem;
    border: 1px solid var(--primary);
    background: var(--bg-card);
    color: var(--primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.bulk-actions-bar .btn-select-all:hover,
.bulk-actions-bar .btn-select-all.active {
    background: var(--primary);
    color: white;
}

.bulk-actions-bar .btn-add-selected {
    padding: 6px 14px;
    font-size: 0.85rem;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.bulk-actions-bar .btn-add-selected:hover {
    background: var(--primary-hover);
}

.bulk-actions-bar .btn-add-selected:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bulk-actions-bar .selected-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-left: auto;
}

.file-item.selected {
    background: var(--primary-light);
    border-color: var(--primary);
}

.file-select-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 4px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
    align-self: center;
}


/* visor común: contador y botones propios de cada pantalla arriba a la derecha de la
   foto sin tapar la X de cerrar, y pie con el nombre */
.visor-esquina { position: absolute; top: var(--visor-esquina-y, 80px); right: var(--visor-esquina-der, 84px); display: flex; gap: 10px; align-items: center; z-index: 2; }
.visor-esquina .contador-fotos { position: static; }
.visor-acciones { display: flex; gap: 10px; align-items: center; }
.visor-acciones:empty { display: none; }
.visor-acciones .ipg-lightbox-fav-btn,
.visor-acciones .ipg-lightbox-hide-btn,
.visor-acciones .dsg-lb-fav-btn { position: static; }
/* corazón que solo se ve: la foto lo tiene pero aquí no se cambia */
.visor-acciones .visor-corazon-fijo, .visor-acciones .visor-corazon-fijo:hover { cursor: default; transform: none; background: rgba(239, 68, 68, 0.9); }
.visor-pie { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); max-width: min(90vw, 900px); padding: 6px 14px; border-radius: 16px; background: rgba(0, 0, 0, 0.6); color: rgba(255, 255, 255, 0.92); font-size: 0.85rem; text-align: center; pointer-events: none; }
body.visor-fotos-abierto { overflow: hidden; }
.visor-pie:not([hidden]) ~ .fullscreen-zoom-hint { bottom: 96px; }
.visor-acciones .visor-corona-fija, .visor-acciones .visor-corona-fija:hover { cursor: default; transform: none; background: rgba(0, 0, 0, 0.6); }
