/**
 * OyunDünyası - YouTube Video Block Frontend Styles
 * Site görünümü - Performans optimizasyonlu
 */

/* Ana blok */
.od-video-block {
    --od-video-radius: 12px;
    --od-video-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin: 2rem 0;
}

/* Video container */
.od-video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: var(--od-video-radius);
    overflow: hidden;
    box-shadow: var(--od-video-shadow);
}

/* Facade pattern - Thumbnail */
.od-video-facade {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gradient overlay on facade */
.od-video-facade::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.1) 50%,
            rgba(0, 0, 0, 0.4) 100%);
    transition: background 0.3s ease;
}

.od-video-facade:hover::before {
    background: rgba(0, 0, 0, 0.2);
}

/* Play button */
.od-video-play-btn {
    position: relative;
    z-index: 2;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.od-video-play-btn:hover,
.od-video-play-btn:focus {
    transform: scale(1.1);
    filter: drop-shadow(0 0 25px rgba(255, 0, 0, 0.6));
    outline: none;
}

.od-video-play-btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 5px;
    border-radius: 8px;
}

/* Play button colors */
.od-video-play-bg {
    fill: #FF0000;
    transition: fill 0.2s ease;
}

.od-video-play-btn:hover .od-video-play-bg {
    fill: #CC0000;
}

.od-video-play-icon {
    fill: #fff;
}

/* Duration badge */
.od-video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    z-index: 3;
    letter-spacing: 0.5px;
}

/* iframe styling */
.od-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Video title */
.od-video-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    border-radius: 0 0 var(--od-video-radius) var(--od-video-radius);
    margin-top: -1px;
}

.od-video-icon {
    font-size: 18px;
}

/* Loading state */
.od-video-loading .od-video-facade {
    animation: od-video-pulse 1.5s ease-in-out infinite;
}

@keyframes od-video-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .od-video-block {
        margin: 1.5rem 0;
    }

    .od-video-title {
        font-size: 14px;
        padding: 12px 15px;
    }

    .od-video-play-btn svg {
        width: 56px;
        height: 40px;
    }

    .od-video-duration {
        font-size: 12px;
        padding: 4px 8px;
        bottom: 8px;
        right: 8px;
    }
}

/* Full width alignment */
.alignfull .od-video-container {
    border-radius: 0;
}

.alignfull .od-video-title {
    border-radius: 0;
}

/* Wide alignment */
.alignwide .od-video-block {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .od-video-block {
        --od-video-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
}

/* Print styles */
@media print {
    .od-video-block {
        page-break-inside: avoid;
    }

    .od-video-facade::after {
        content: 'Video: ' attr(aria-label);
        position: absolute;
        bottom: 10px;
        left: 10px;
        color: #000;
        background: #fff;
        padding: 5px 10px;
        font-size: 12px;
    }
}