/* ====================== PHOTO PREVIEW LIGHTBOX ====================== */
/* Componente reutilizable para preview de fotos de jugadores */

.photo-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 200;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.photo-preview-overlay.active {
    display: flex;
    opacity: 1;
}

.photo-preview-overlay.opening {
    animation: photoFadeIn 0.3s ease forwards;
}

.photo-preview-overlay.closing {
    animation: photoFadeOut 0.25s ease forwards;
}

@keyframes photoFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes photoFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.photo-preview-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
    z-index: 210;
}

.photo-preview-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.photo-preview-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.photo-preview-details {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.photo-preview-position {
    background: rgba(49, 192, 27, 0.25);
    color: var(--panteras, #31c01b);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
}

.photo-preview-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.photo-preview-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.photo-preview-close:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.25);
}

.photo-preview-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 4.5rem 1rem 5rem;
    touch-action: pan-x pinch-zoom;
    overflow: hidden;
}

.photo-preview-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    transition: transform 0.25s ease, opacity 0.2s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.photo-preview-image.zoomed {
    transform: scale(1.5);
    cursor: zoom-out;
}

.photo-preview-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.photo-preview-nav {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(49, 192, 27, 0.2);
    border: 2px solid rgba(49, 192, 27, 0.5);
    color: var(--panteras, #31c01b);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.photo-preview-nav:hover {
    background: rgba(49, 192, 27, 0.4);
}

.photo-preview-nav:active {
    transform: scale(0.92);
    background: rgba(49, 192, 27, 0.4);
}

.photo-preview-nav:disabled {
    opacity: 0.3;
    pointer-events: none;
}

.photo-preview-counter {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
}

.photo-preview-hint {
    position: absolute;
    bottom: 5.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.photo-preview-hint.hidden {
    opacity: 0;
}

/* ====================== CLICKABLE PHOTOS ====================== */
/* Estilos para fotos que son clickeables */

.player-photo-clickable {
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease;
}

.player-photo-clickable:hover {
    transform: scale(1.05);
}

.player-photo-clickable:active {
    transform: scale(0.98);
}

.player-photo-clickable::after {
    content: '\f065';
    /* fa-expand */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.55rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.player-photo-clickable:hover::after {
    opacity: 1;
}

/* Para fotos dentro de tarjetas de ranking o podio */
.ranking-card .player-photo-clickable::after,
.podio-card .player-photo-clickable::after {
    bottom: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    font-size: 0.65rem;
}

/* Responsive */
@media (max-width: 768px) {
    .photo-preview-nav {
        width: 42px;
        height: 42px;
    }

    .photo-preview-close {
        width: 40px;
        height: 40px;
    }

    .player-photo-clickable::after {
        opacity: 0.7;
    }
}