/* Review Gallery Slider */

.yayrev-review-gallery {
    position: relative;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0;
    visibility: hidden;
}

.yayrev-review-gallery.is-ready {
    visibility: visible;
}

.yayrev-review-gallery:focus {
    outline: none;
}

/* Viewport clips overflow */
.yayrev-review-gallery__viewport {
    overflow: hidden;
}

/* Track: spacing handled by card margin */
.yayrev-review-gallery__track {
    display: flex;
    transition: transform 0.4s ease;
}

/* ── Card ── */
.yayrev-review-gallery__card {
    aspect-ratio: 3 / 4;
    background: #1a1a1a;
    border-radius: 12px;
    box-sizing: border-box;
    color: #fff;
    cursor: pointer;
    display: block;
    flex: 0 0 auto;
    min-width: 0;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

/* Media fills card */
.yayrev-review-gallery__media {
    position: absolute;
    inset: 0;
    object-fit: cover;
    transition: transform 0.3s ease;
    height: 100% !important;
    width: 100%;
}

.yayrev-review-gallery__card:hover .yayrev-review-gallery__media {
    transform: scale(1.05);
}

/* Play icon (centered, for video cards) */
.yayrev-review-gallery__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.yayrev-review-gallery__card:hover .yayrev-review-gallery__play {
    opacity: 1;
}

/* Media count badge (top-right pill) */
.yayrev-review-gallery__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    pointer-events: none;
}

/* ── Inner Media Arrows (cycle within card) ── */
.yayrev-review-gallery__media-prev,
.yayrev-review-gallery__media-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
    padding: 0;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.15s ease;
}

.yayrev-review-gallery__card:hover .yayrev-review-gallery__media-prev,
.yayrev-review-gallery__card:hover .yayrev-review-gallery__media-next,
.yayrev-review-gallery__media-prev:focus-visible,
.yayrev-review-gallery__media-next:focus-visible {
    opacity: 1;
}

.yayrev-review-gallery__media-prev:hover,
.yayrev-review-gallery__media-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

.yayrev-review-gallery__media-prev {
    left: 8px;
}

.yayrev-review-gallery__media-next {
    right: 8px;
}

/* Gradient overlay (bottom) */
.yayrev-review-gallery__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    padding: 40px 16px 16px;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.9) 80%);
    color: #fff;
}

/* Rating */
.yayrev-review-gallery__rating {
    display: flex;
    margin-bottom: 6px;
}

.yayrev-gallery-rating {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.yayrev-gallery-rating .yayrev-rating-icon {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    line-height: 1;
}

.yayrev-gallery-rating .yayrev-rating-icon--empty {
    opacity: 0.35;
    filter: grayscale(100%);
}

.yayrev-gallery-rating .yayrev-rating-label {
    margin-left: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
}

/* Stars-specific: gold filled, dim empty for overlay contrast */
.yayrev-gallery-rating--stars .yayrev-rating-icon--filled {
    color: #f59e0b;
}

.yayrev-gallery-rating--stars .yayrev-rating-icon--empty {
    color: rgba(255, 255, 255, 0.4);
    filter: none;
    opacity: 1;
}

/* Excerpt */
.yayrev-review-gallery__excerpt {
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0 0 4px;
    overflow: hidden;
}

/* Author */
.yayrev-review-gallery__author {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

/* ── Navigation Arrows ── */
.yayrev-review-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 0;
}

.yayrev-review-gallery__nav:hover {
    background: #f9fafb;
    border-color: var(--wp--preset--color--brandy-primary, #111111);
    color: var(--wp--preset--color--brandy-primary, #111111);
}

.yayrev-review-gallery__prev {
    left: -48px;
}

.yayrev-review-gallery__next {
    right: -48px;
}

/* ── Pagination Dots ── */
.yayrev-review-gallery__dots {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 20px;
}

.yayrev-review-gallery__dot {
    background: #545454;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
    height: 6px;
    width: 6px;
}

.yayrev-review-gallery__dot.is-active {
    background: #EE5A58;
}
.yayrev-review-gallery__dot.is-active {
    position: relative;
}
.yayrev-review-gallery__dot.is-active::before {
    content: '';
    border: 1px solid #EE5A58;
    border-radius: 50%;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 16px;
    width: 16px;
}

/* ── Responsive ── */

/* Tablet */
@media (max-width: 1024px) {
    .yayrev-review-gallery__prev {
        left: -40px;
    }

    .yayrev-review-gallery__next {
        right: -40px;
    }
}

/* Mobile: arrows overlay card edges */
@media (max-width: 768px) {
    .yayrev-review-gallery__prev {
        left: 4px;
    }

    .yayrev-review-gallery__next {
        right: 4px;
    }

    .yayrev-review-gallery__nav {
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.9);
    }
}
