/* Product video (inc/product-video.php). Plain CSS, no Tailwind build needed. */

.bc-pv {
    position: relative;
    width: 100%;
    aspect-ratio: var(--bc-pv-ratio, 16 / 9);
    background: #1f2f2f;
    overflow: hidden;
}

.bc-pv__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}

.bc-pv__play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(37, 67, 67, .85);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
    transition: transform .2s ease, background-color .2s ease;
}

.bc-pv__play:hover,
.bc-pv__play:focus-visible {
    transform: scale(1.08);
    background: #E5AF4D;
    color: #254343;
}

.bc-pv__play:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.bc-pv__play svg {
    width: 28px;
    height: 28px;
    margin-left: 3px;
}

.bc-pv.is-started .bc-pv__play {
    display: none;
}

.bc-pv .bc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* In the gallery: match the slide area rather than the video's own shape. */
.bc-pv--gallery {
    aspect-ratio: 1 / 1;
}

/* Gallery video open: dim the page and lift the gallery above the dimmed layer. */
.bc-pv-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(15, 25, 25, .72);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

body.bc-pv-open .bc-pv-overlay {
    opacity: 1;
    visibility: visible;
    cursor: pointer;
}

body.bc-pv-open .woo-variation-product-gallery {
    position: relative;
    z-index: 99991;
}

body.bc-pv-open .woo-variation-gallery-trigger {
    display: none;
}

body.bc-pv-open .woo-variation-gallery-wrapper {
    background: #fff;
    border-radius: 12px;
}

.bc-pv__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 40px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: #254343;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

.bc-pv__close svg {
    width: 20px;
    height: 20px;
}

.bc-pv__close:hover,
.bc-pv__close:focus-visible {
    background: #E5AF4D;
}

body.bc-pv-open .bc-pv.is-started .bc-pv__close {
    display: flex;
}

/* Gallery thumbnail: poster + play badge */
.bc-pv-thumb {
    position: relative;
    display: block;
    width: 100%;
}

.bc-pv-thumb img {
    display: block;
    width: 100% !important;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.bc-pv-thumb__badge {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(37, 67, 67, .85);
    color: #fff;
    pointer-events: none;
}

.bc-pv-thumb__badge svg {
    width: 14px;
    height: 14px;
    margin-left: 2px;
}

/* "How to Set Up" tutorial videos (inc/tutorials.php): 1 per row on mobile, 2 on tablet, 3 on desktop.
 * Plain CSS because the responsive grid classes aren't in the compiled product.css. */
.bc-tutorial-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

@media (min-width: 640px) {
    .bc-tutorial-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .bc-tutorial-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* After the description: all product videos in one row of vertical cards
 * (2 per row on phones, 3 on tablets, 4 on desktop). */
.bc-pv-row {
    clear: both;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 24px 0;
}

@media (min-width: 640px) {
    .bc-pv-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .bc-pv-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 24px;
    }
}

.bc-pv-card {
    min-width: 0;
}

.bc-pv-card__title {
    margin: 10px 2px 0;
    font: 600 14px/1.35 Inter, sans-serif;
    color: #254343;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bc-pv-reel__duration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    font: 500 12px/1.4 Inter, sans-serif;
    pointer-events: none;
}

.bc-pv-reel.is-playing .bc-pv-reel__duration {
    display: none;
}

.bc-pv-reel__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Vertical video, styled exactly like the home "Booncart Difference" setup video
 * (.bc-diff__video in assets/css/home-hero.css). */
.bc-pv-reel {
    position: relative;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    border-radius: 22px;
    background: #2b4545;
    box-shadow: 0 18px 36px -24px rgba(37, 67, 67, .6);
}

.bc-pv-reel .bc-pv-reel__poster {
    position: absolute;
    inset: 0;
    width: 100% !important;  /* description content styles set img height:auto */
    height: 100% !important;
    max-width: none;
    margin: 0;
    object-fit: cover;
    object-position: 50% 22%;
    transition: filter .3s, transform .3s;
}

.bc-pv-reel.is-playing .bc-pv-reel__poster {
    filter: blur(18px) brightness(.7);
    transform: scale(1.15);
}

.bc-pv-reel__player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}

.bc-pv-reel__player:focus-visible {
    outline: 3px solid #E5AF4D;
    outline-offset: -3px;
}

.bc-pv-reel__play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    padding: 0 0 0 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    color: #254343;
    box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .35);
    cursor: pointer;
    transition: transform .2s;
}

.bc-pv-reel__play svg {
    width: 28px;
    height: 28px;
}

.bc-pv-reel__play:hover {
    transform: scale(1.08);
}

.bc-pv-reel__play:focus-visible {
    outline: 3px solid #E5AF4D;
    outline-offset: 3px;
}

.bc-pv-reel__callout {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 104px;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #254343;
    transform: rotate(-6deg);
    pointer-events: none;
}

.bc-pv-reel__callout-shape {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: #fbe4cf;
    stroke: #f0c49c;
    stroke-width: 1.2;
    filter: drop-shadow(0 6px 12px rgba(150, 100, 60, .25));
}

.bc-pv-reel__callout-text {
    position: relative;
    padding: 0 16px;
    text-align: center;
    font: 600 12px/1.2 Inter, sans-serif;
}

.bc-pv-reel__callout-arrow {
    position: relative;
    width: 26px;
    height: 9px;
    margin-top: 4px;
}

.bc-pv-reel .bc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Badge scaled to the card width. */
.bc-pv-row .bc-pv-reel__callout {
    top: 8px;
    right: 8px;
    width: min(104px, 46%);
}

.bc-pv-row .bc-pv-reel__callout-text {
    padding: 0 10px;
    font-size: 11px;
}

.bc-pv-row .bc-pv-reel__play {
    width: 52px;
    height: 52px;
    margin: -26px 0 0 -26px;
}

.bc-pv-row .bc-pv-reel__play svg {
    width: 22px;
    height: 22px;
}

@media (max-width: 639px) {
    .bc-pv-row .bc-pv-reel__callout {
        width: 52%;
    }

    .bc-pv-row .bc-pv-reel__callout-text {
        padding: 0 8px;
        font-size: 9.5px;
    }

    .bc-pv-row .bc-pv-reel__callout-arrow {
        width: 18px;
        margin-top: 2px;
    }
}

@media (min-width: 1024px) {
    .bc-pv-row .bc-pv-reel__callout-text {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bc-pv-reel__play,
    .bc-pv-reel__poster {
        transition: none;
    }
}
