/* Artist Gallery Styles */

.jarrell-artist-gallery__thumbs-title {
    font-family: var(--font-sans, sans-serif);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #121112;
    letter-spacing: 0.1em;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(18, 17, 18, 0.1);
}

/* =============================================
   MAIN SLIDER - Ratio control
   widgets.css sets aspect-ratio: 1/1 as base.
   We override with 16:9 by default for videos.
   Switch to 1:1 via JS class when photo is active.
   ============================================= */
.jarrell-artist-gallery__main {
    width: 100%;
    aspect-ratio: 16 / 9 !important;
    position: relative;
    overflow: hidden;
    transition: aspect-ratio 0.3s ease;
    user-select: none; /* Prevent selection on rapid clicks */
    -webkit-user-select: none;
}

.jarrell-artist-gallery__main.ratio-16-9 {
    aspect-ratio: 16 / 9 !important;
}

.jarrell-artist-gallery__main.ratio-1-1 {
    aspect-ratio: 1 / 1 !important;
}

/* Ensure photo slides fill the square area cleanly with cover.
   Also override the .jarrell-artist-profile-media__item aspect-ratio (3/2)
   which is applied from widgets.css on main slides. */
.jarrell-artist-gallery__main .jarrell-artist-gallery__slide-main[data-type="image"],
.jarrell-artist-gallery__main .jarrell-artist-profile-media__item[data-type="image"] {
    aspect-ratio: unset !important;
    width: 100% !important;
    height: 100% !important;
}

.jarrell-artist-gallery__slide-main[data-type="image"] img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* Entire slider area should not be selectable to prevent blue highlight on rapid click */
.jarrell-gallery-slider {
    user-select: none;
    -webkit-user-select: none;
}

/* Fullscreen Styles */
.jarrell-gallery-slider:-webkit-full-screen {
    background: #000;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.jarrell-gallery-slider:fullscreen {
    background: #000;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.jarrell-gallery-slider:-webkit-full-screen .jarrell-artist-gallery__main {
    max-height: 100vh;
}

.jarrell-gallery-slider:fullscreen .jarrell-artist-gallery__main {
    max-height: 100vh;
}

/* =============================================
   THUMBNAILS GRID
   ============================================= */
.jarrell-artist-gallery__thumbs-grid {
    margin-bottom: 20px;
    user-select: none;
    -webkit-user-select: none;
}

.jarrell-artist-gallery__thumbs-wrapper {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

/* Default thumb ratio: 16:9 (for videos/audio) */
.jarrell-artist-gallery__slide-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border-radius: 4px;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.3s ease;
}

/* Photo thumbnails: Square 1:1 */
.jarrell-artist-gallery__thumbs-grid--photos .jarrell-artist-gallery__slide-thumb {
    aspect-ratio: 1 / 1 !important;
}

.jarrell-artist-gallery__thumbs-grid--photos .jarrell-artist-gallery__slide-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

.jarrell-artist-gallery__slide-thumb:hover {
    opacity: 0.9;
}

.jarrell-artist-gallery__slide-thumb.jarrell-thumb-active {
    opacity: 1;
    border-color: #121112;
}

.jarrell-thumb-play-icon,
.jarrell-thumb-audio-icon {
    pointer-events: none;
    transition: transform 0.2s ease;
}

.jarrell-artist-gallery__slide-thumb:hover .jarrell-thumb-play-icon,
.jarrell-artist-gallery__slide-thumb:hover .jarrell-thumb-audio-icon {
    transform: translate(-50%, -50%) scale(1.15) !important;
}

@media (max-width: 768px) {
    .jarrell-artist-gallery__thumbs-wrapper {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .jarrell-artist-gallery__thumbs-wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}