/* MCGS Premium UI Overhaul */

/* 1. Hero Trigger & Pill Badge */
.mcgs-hero-trigger {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;

}

.mcgs-hero-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.mcgs-hero-trigger:hover .mcgs-hero-img {
    transform: scale(1.05);
}

.mcgs-pill-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    padding: 6px 14px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    z-index: 10;
}

.mcgs-pill-badge .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 1.5. On-Page Thumbs (BBC/Ligier Style) */
:root {
    --mcgs-primary-bg: #fff;
    --mcgs-primary-text: #010101;
    --mcgs-primary-cta: #26CAD3;
    /* BBC/Ligier Cyan */
    --mcgs-thumbnail-gap: 12px;
}

.image-gallery-thumbnails-wrapper {
    position: relative;
    top: -40px;
    font-family: ReithSans, Helvetica, Arial, sans-serif;
    user-select: none;
    height: 10px;

}

.ThumbnailScrollerWrapper-sc-1tax92a-0 {
    position: absolute;
    top: 42px;
    right: 0;
    z-index: 10;
}

.ThumbnailScroller-sc-1tax92a-1 {
    display: flex;
    gap: 4px;
}

.ImageGalleryPageButton-sc-1tax92a-2 {
    background: #f4f4f4;
    border: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #010101;
    transition: background 0.2s, color 0.2s;
    border-radius: 2px;
}

.ImageGalleryPageButton-sc-1tax92a-2:hover {
    background: var(--mcgs-primary-cta);
    color: #fff;
}

.ImageGalleryPageButton-sc-1tax92a-2 svg {
    width: 20px;
    height: 20px;
}

.image-gallery-thumbnails {
    overflow: hidden;
    padding-bottom: 10px;
}

.image-gallery-thumbnails-container {
    display: flex;
}

.image-gallery-thumbnail {
    flex: 0 0 auto;
    background: none;
    border: none;
    padding: 0;
    margin-right: var(--mcgs-thumbnail-gap);
    cursor: pointer;
    width: 100px;
    position: relative;
    padding-bottom: 8px;
}

.image-gallery-thumbnail-inner {
    display: block;
    overflow: hidden;
    transition: opacity 0.3s;
}

.image-gallery-thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 2 / 1;
}

/* Active State (BBC Cyan Bottom Border) */
.image-gallery-thumbnail.swiper-slide-thumb-active:after,
.image-gallery-thumbnail.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    /* Thicker like the reference */
    background: var(--mcgs-primary-cta);
}

.image-gallery-thumbnail:hover .image-gallery-thumbnail-inner {
    opacity: 0.8;
}

/* 2. Studio Mode Lightbox */
.mcgs-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 999999;
    flex-direction: column;
}

/* Toolbar */
.mcgs-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    color: #fff;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
    box-sizing: border-box;
}

.mcgs-counter {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-family: monospace;
}

.mcgs-tools {
    display: flex;
    gap: 15px;
}

.mcgs-tool-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.mcgs-tool-btn:hover {
    opacity: 1;
}

/* Main Swiper */
.mcgs-main-swiper {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
}

.mcgs-lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    margin: auto;
}

/* Thumbs Swiper */
.mcgs-thumbs-swiper {
    height: 80px;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 0;
    box-sizing: content-box;
}

.mcgs-thumbs-swiper .swiper-slide {
    width: 120px;
    height: 80px;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.3s;
    border-radius: 4px;
    overflow: hidden;
}

.mcgs-thumbs-swiper .swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid #fff;
}

.mcgs-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Swiper Customizations */
.mcgs-main-swiper .swiper-button-next,
.mcgs-main-swiper .swiper-button-prev {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.mcgs-main-swiper .swiper-button-next:after,
.mcgs-main-swiper .swiper-button-prev:after {
    font-size: 20px;
}

/* Hide Swiper built-ins if needed */
.swiper-zoom-container {
    display: flex;
    justify-content: center;
    align-items: center;
}