/**
 * GS Video Block - custom PrestaShop module.
 *
 * @author    Custom
 * @copyright Copyright (c) 2026 Custom. All rights reserved.
 * @license   Proprietary - for use on the licensed shop(s) only.
 * @package   gsvideoblock
 */

.gsvideoblock {
    margin: 15px 0;
}

.gsvideoblock-title {
    font-weight: 600;
    margin: 0 0 8px;
    font-size: 14px;
}

/* --- Cover + play button facade (used by both popup and inline) --- */
.gsvideoblock-thumb,
.gsvideoblock-inline-holder {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background-color: #111;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.gsvideoblock-thumb {
    cursor: pointer;
    transition: box-shadow 0.15s ease;
    /* "contain" instead of "cover": always shows the whole poster
       image, never crops it - any leftover space is filled by the
       dark background-color above instead of zooming/cropping in. */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.gsvideoblock-thumb:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.gsvideoblock-thumb:hover .gsvideoblock-play {
    transform: translate(-50%, -50%) scale(1.08);
}

.gsvideoblock-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    transition: transform 0.15s ease;
    pointer-events: none;
}

.gsvideoblock-inline-holder iframe,
.gsvideoblock-inline-holder video,
.gsvideoblock-player-wrap iframe,
.gsvideoblock-player-wrap video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background-color: #000;
}

/* --- Popup modal --- */
.gsvideoblock-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.gsvideoblock-modal.gsvideoblock-open {
    display: flex;
}

.gsvideoblock-modal-inner {
    position: relative;
    width: 90%;
    max-width: 900px;
}

.gsvideoblock-player-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #000;
    border-radius: 6px;
    overflow: hidden;
}

.gsvideoblock-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}
