/* LibreCOD — product video feed carousel (Libre_Product_Videos::render) */
.lcv {
    --lcv-gap: 16px;
    margin: 32px 0 8px;
    min-width: 0;
}
.lcv-title {
    margin: 0 0 18px;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    text-wrap: balance;
}
.lcv-viewport {
    position: relative;
}
.lcv-track {
    display: flex;
    gap: var(--lcv-gap);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.lcv-track::-webkit-scrollbar { display: none; }

.lcv-card {
    flex: 0 0 calc((100% - 3 * var(--lcv-gap)) / 4);
    min-width: 0;
    margin: 0;
    scroll-snap-align: start;
}
.lcv-media {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: 12px;
    overflow: hidden;
    background: #111 linear-gradient(160deg, #1f2937, #0b0b0b);
}
.lcv-cover,
.lcv-video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.lcv-cover { pointer-events: none; }
/* The video stays invisible until it is first played (the cover shows instead);
   once started, a paused video keeps showing its current frame */
.lcv-video { opacity: 0; cursor: pointer; }
.lcv-card.is-started .lcv-video { opacity: 1; }

/* Big play button over a light dark overlay — hidden while the video plays */
.lcv-start {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, .35);
    box-shadow: none;
    min-height: 0;
    line-height: 0;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .15s ease;
}
.lcv-start:hover,
.lcv-start:focus { background: rgba(0, 0, 0, .45); color: #111; }
.lcv-start-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-inline-start: 4px; /* optical centre of the triangle */
    box-shadow: 0 4px 18px rgba(0, 0, 0, .3);
    transition: transform .15s ease;
}
[dir="rtl"] .lcv-start-circle { padding-inline-start: 0; padding-inline-end: 4px; }
.lcv-start:hover .lcv-start-circle { transform: scale(1.06); }
.lcv-start:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.lcv-card.is-playing .lcv-start { display: none; }

/* Loading spinner while the pressed video buffers */
.lcv-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 42px;
    height: 42px;
    margin: -21px 0 0 -21px;
    border: 3px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    pointer-events: none;
    animation: lcv-spin .8s linear infinite;
}
.lcv-card.is-loading .lcv-spinner { display: block; }
@keyframes lcv-spin { to { transform: rotate(360deg); } }

/* Sound button — bottom corner, only while playing */
.lcv-btn {
    position: absolute;
    bottom: 10px;
    z-index: 2;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, .88);
    color: #111;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .15s ease;
}
.lcv-card.is-playing .lcv-btn { display: flex; }
.lcv-btn:hover { background: #fff; }
.lcv-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lcv-mute { inset-inline-end: 10px; }

.lcv-i-sound { display: none; }
.lcv-card.is-unmuted .lcv-i-muted { display: none; }
.lcv-card.is-unmuted .lcv-i-sound { display: block; }

.lcv-name {
    margin: 10px 0 0;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

/* Arrows */
.lcv-nav {
    position: absolute;
    top: calc(50% - 22px);
    z-index: 2;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    transition: opacity .15s ease;
}
.lcv-left  { left: 8px; }
.lcv-right { right: 8px; }
.lcv-nav[disabled] { opacity: 0; pointer-events: none; }
.lcv-nav:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

@media (max-width: 900px) {
    .lcv-card { flex-basis: calc((100% - 2 * var(--lcv-gap)) / 2.4); }
}
@media (max-width: 540px) {
    .lcv { --lcv-gap: 12px; }
    .lcv-title { font-size: 1.3rem; }
    .lcv-card { flex-basis: 78%; }
}
@media (max-width: 540px) {
    .lcv-start-circle { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
    .lcv-track { scroll-behavior: auto; }
    .lcv-spinner { animation-duration: 2s; }
}
