.gw-ytpc {
    --gw-ytpc-gap: 20px;
    --gw-ytpc-heading-size: 30px;
    --gw-ytpc-heading-color: #111111;
    --gw-ytpc-heading-font: Arial, sans-serif;
    --gw-ytpc-title-size: 16px;
    --gw-ytpc-title-color: #111111;
    --gw-ytpc-title-font: Arial, sans-serif;
    width: 100%;
    box-sizing: border-box;
}

.gw-ytpc *,
.gw-ytpc *::before,
.gw-ytpc *::after {
    box-sizing: border-box;
}

.gw-ytpc-heading {
    margin: 0 0 24px;
    color: var(--gw-ytpc-heading-color);
    font-family: var(--gw-ytpc-heading-font);
    font-size: var(--gw-ytpc-heading-size);
    line-height: 1.15;
    font-weight: 700;
}

.gw-ytpc-shell {
    position: relative;
    width: 100%;
    padding: 0 48px;
}

.gw-ytpc-track {
    display: flex;
    gap: var(--gw-ytpc-gap);
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.gw-ytpc-track::-webkit-scrollbar {
    display: none;
}

.gw-ytpc-card {
    flex: 0 0 auto;
    min-width: 0;
    margin: 0;
    scroll-snap-align: start;
}

.gw-ytpc-columns-2 .gw-ytpc-card { width: calc((100% - 20px) / 2); }
.gw-ytpc-columns-3 .gw-ytpc-card { width: calc((100% - 40px) / 3); }
.gw-ytpc-columns-4 .gw-ytpc-card { width: calc((100% - 60px) / 4); }
.gw-ytpc-columns-5 .gw-ytpc-card { width: calc((100% - 80px) / 5); }

.gw-ytpc-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    border-radius: 8px;
}

.gw-ytpc-video-button,
.gw-ytpc-iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    margin: 0;
    padding: 0;
}

.gw-ytpc-video-button {
    position: relative;
    cursor: pointer;
    background: #000;
}

.gw-ytpc-video-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease, opacity .25s ease;
}

.gw-ytpc-video-button:hover img,
.gw-ytpc-video-button:focus-visible img {
    transform: scale(1.025);
    opacity: .88;
}

.gw-ytpc-video-button:focus-visible,
.gw-ytpc-arrow:focus-visible,
.gw-ytpc-track:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.gw-ytpc-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 62px;
    height: 44px;
    border-radius: 12px;
    background: #ff0000;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .28);
}

.gw-ytpc-play::after {
    content: '';
    position: absolute;
    left: 25px;
    top: 12px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid #fff;
}

.gw-ytpc-title {
    margin: 12px 0 0;
    color: var(--gw-ytpc-title-color);
    font-family: var(--gw-ytpc-title-font);
    font-size: var(--gw-ytpc-title-size);
    line-height: 1.35;
    font-weight: 600;
}

.gw-ytpc-arrow {
    position: absolute;
    z-index: 3;
    top: calc(50% - 22px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    margin: 0;
    padding: 0;
    background: rgba(17, 17, 17, .92);
    color: #fff;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
    transition: opacity .2s ease, transform .2s ease;
}

.gw-ytpc-arrow:hover:not(:disabled) {
    transform: scale(1.06);
}

.gw-ytpc-arrow:disabled {
    opacity: .2;
    cursor: default;
}

.gw-ytpc-prev { left: 0; }
.gw-ytpc-next { right: 0; }

.gw-ytpc-admin-message {
    padding: 12px 14px;
    border-left: 4px solid #d63638;
    background: #fff;
    color: #1d2327;
}

@media (max-width: 900px) {
    .gw-ytpc-columns-3 .gw-ytpc-card,
    .gw-ytpc-columns-4 .gw-ytpc-card,
    .gw-ytpc-columns-5 .gw-ytpc-card {
        width: calc((100% - 20px) / 2);
    }
}

@media (max-width: 600px) {
    .gw-ytpc-shell {
        padding: 0 36px;
    }

    .gw-ytpc-columns-2 .gw-ytpc-card,
    .gw-ytpc-columns-3 .gw-ytpc-card,
    .gw-ytpc-columns-4 .gw-ytpc-card,
    .gw-ytpc-columns-5 .gw-ytpc-card {
        width: 100%;
    }

    .gw-ytpc-arrow {
        width: 30px;
        height: 40px;
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gw-ytpc-track { scroll-behavior: auto; }
    .gw-ytpc-video-button img,
    .gw-ytpc-arrow { transition: none; }
}
