/* ===== Miniatury wideo (dodatkowe, pod galerią) ===== */
.wc-pvg-thumb-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 3px;
    padding: 6px 10px;
    margin: 4px 4px 0 0;
    background: #f8f8f8;
    transition: border-color .2s, background .2s;
    min-width: 56px;
    text-align: center;
    font-size: 12px;
    line-height: 1.3;
    /* BRAK min-height – nie dotyczy głównego placeholdera */
}
.wc-pvg-thumb-item:hover,
.wc-pvg-thumb-item.wc-pvg-active {
    border-color: #96588a;
    background: #f3eaf8;
}
.wc-pvg-play-icon {
    font-size: 22px;
    line-height: 1;
    color: #555;
}
.wc-pvg-thumb-item:hover .wc-pvg-play-icon,
.wc-pvg-thumb-item.wc-pvg-active .wc-pvg-play-icon {
    color: #96588a;
}
.wc-pvg-thumb-label {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #555;
    font-size: 11px;
}

/* ===== Wrapper slajdu – traktowany przez FlexSlider jak natywny slajd ===== */
.wc-pvg-slide-wrapper {
    display: block;
    float: left;
    /* wysokość ustawiana przez JS z flex-viewport */
}

/* ===== Główny placeholder (first_slide) ===== */
/* Resetujemy wszystkie style odziedziczone po .wc-pvg-thumb-item */
.wc-pvg-first-slide {
    /* reset miniaturowych styli */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 0 !important;   /* ← kluczowe – JS ustawia height jawnie */
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 4px !important;
    /* wygląd */
    position: relative !important;
    width: 100% !important;
    cursor: pointer !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
.wc-pvg-first-slide .wc-pvg-play-icon {
    font-size: 64px !important;
    color: #fff !important;
    opacity: .9 !important;
    line-height: 1 !important;
    pointer-events: none;
    transition: transform .2s, opacity .2s;
}
.wc-pvg-first-slide:hover .wc-pvg-play-icon {
    opacity: 1 !important;
    transform: scale(1.1) !important;
}
.wc-pvg-first-slide .wc-pvg-thumb-label {
    color: #fff !important;
    font-size: 14px !important;
    margin-top: 10px !important;
    max-width: 80% !important;
    white-space: normal !important;
    text-align: center !important;
    pointer-events: none;
}
/* iframe/video po kliknięciu */
.wc-pvg-first-slide iframe,
.wc-pvg-first-slide video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    display: block !important;
}

/* ===== Osobny player dla miniatur ===== */
#wc-pvg-player-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}
#wc-pvg-player-wrap iframe,
#wc-pvg-player-wrap video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}
#wc-pvg-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background .2s;
}
#wc-pvg-close:hover {
    background: rgba(0,0,0,.9);
}

/* ===== Kafelek wideo w miniaturach FlexSlider ===== */
.wc-pvg-control-thumb .wc-pvg-thumb-tile {
    width: 100px;
    height: 100px;
    background: #111;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    opacity: .85;
    transition: opacity .2s;
    box-sizing: border-box;
    border: 3px solid transparent;
    overflow: hidden;
    position: relative;
}
.wc-pvg-control-thumb:hover .wc-pvg-thumb-tile,
.wc-pvg-control-thumb .wc-pvg-thumb-tile.flex-active {
    opacity: 1;
    border-color: #96588a;
}
/* Ikona play na thumbnailem YT */
.wc-pvg-thumb-tile .wc-pvg-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0,0,0,.8);
    pointer-events: none;
    line-height: 1;
}
