/**
 * WAD Video Engine - Frontend Styles
 * Includes YouTube player masking to hide branding and UI elements
 */

/* Video Container */
.wad-video-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

/* YouTube Player Masking */
.wad-video-embed {
    position: relative;
    overflow: hidden;
    background: #000;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
}

.wad-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 1;
    border: none;
}

/* Hide YouTube Title / Channel Info (top section) */
.wad-video-embed::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background: #000;
    z-index: 9999;
    pointer-events: none;
}

/* Hide "Watch on YouTube" Button (bottom-right) */
.wad-video-embed::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 115px;
    height: 42px;
    background: #000;
    z-index: 9999;
    pointer-events: none;
}

/* Additional watermark mask */
.wad-video-embed .wad-youtube-watermark-mask {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 130px;
    height: 50px;
    background: #000;
    z-index: 9998;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .wad-video-embed::before { height: 48px; }
    .wad-video-embed::after { width: 100px; height: 36px; }
    .wad-video-embed .wad-youtube-watermark-mask { width: 110px; height: 44px; }
}

@media (max-width: 480px) {
    .wad-video-embed::before { height: 40px; }
    .wad-video-embed::after { width: 85px; height: 30px; }
    .wad-video-embed .wad-youtube-watermark-mask { width: 95px; height: 38px; }
}

/* Self-hosted video */
.wad-video-player {
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.wad-video-player video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

/* Trailer section */
.wad-video-trailer {
    margin: 0 0 24px 0;
    padding: 0;
    background: none;
    border: none;
    max-width: 100%;
}

.wad-trailer-title {
    margin: 0 0 10px 0;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.wad-trailer-wrapper {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.wad-trailer-wrapper iframe,
.wad-trailer-wrapper video {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    background: #000;
}

/* Video meta */
.wad-video-meta-wrapper {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    text-align: center;
}

.wad-video-meta {
    display: inline-block;
    margin: 0 15px;
    font-size: 13px;
    color: #666;
}

.wad-video-meta strong {
    color: #333;
}

/* Purchased videos grid */
.wad-purchased-videos-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns, 4), 1fr);
    gap: 20px;
    margin: 20px 0;
}

.wad-purchased-video-item {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.wad-purchased-video-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.wad-purchased-video-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.wad-video-placeholder {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a2a;
    color: #fff;
    font-size: 48px;
}

.wad-video-item-content {
    padding: 15px;
}

.wad-video-item-content h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    line-height: 1.4;
    min-height: 40px;
}

.wad-watch-button {
    display: inline-block;
    background: #ff6b35;
    color: #fff;
    padding: 6px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.3s;
}

.wad-watch-button:hover {
    background: #e55a2b;
    color: #fff;
}

.wad-pending-label {
    display: inline-block;
    background: #f0f0f0;
    color: #999;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 13px;
}

/* Responsive grid */
@media (max-width: 1024px) { .wad-purchased-videos-grid { --columns: 3; } }
@media (max-width: 768px) { .wad-purchased-videos-grid { --columns: 2; gap: 15px; } }
@media (max-width: 480px) { .wad-purchased-videos-grid { --columns: 1; gap: 12px; } }