/* ============================================
   DM Video Shared Styles
   Common styles used by both Video Carousel and Video Embed
   ============================================ */

/* ============================================
   Video Thumbnail Base Styles
   ============================================ */

.dm-video-thumbnail {
    position: relative;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dm-video-thumbnail:hover {
    /* transform: translateY(-5px); */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Video Overlay
   ============================================ */

.dm-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.dm-video-thumbnail:hover .dm-video-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* ============================================
   Play Button Base Styles
   ============================================ */

.dm-video-play-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    outline: none;
}

.dm-video-play-btn:hover {
    transform: scale(1.1);
    opacity: 1;
}

.dm-video-play-btn:hover svg circle,
.dm-video-play-btn:focus svg circle {
    fill: rgb(76, 113, 179);
}

.dm-video-play-btn:focus {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.dm-video-play-btn svg {
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* ============================================
   Video Info/Text Styles
   ============================================ */

.dm-video-info {
    padding: 20px 10px;
}

.dm-video-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.4;
}

.dm-video-description {
    font-size: 16px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* ============================================
   Video Modal Styles
   ============================================ */

.dm-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

.dm-video-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.dm-video-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    z-index: 1000000;
}

.dm-video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dm-video-modal-close:hover {
    opacity: 0.7;
    transform: scale(1.2);
}

.dm-video-modal-close:focus {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.dm-video-modal-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.dm-video-modal-player iframe,
.dm-video-modal-player video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Prevent body scrolling when modal is open */
body.dm-video-modal-open {
    overflow: hidden;
}

/* Loading State */
.dm-video-modal-player:empty::after {
    content: 'Loading video...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 18px;
}

/* ============================================
   Responsive Design - Shared Breakpoints
   ============================================ */

@media (max-width: 768px) {
    .dm-video-title {
        font-size: 20px;
    }

    .dm-video-description {
        font-size: 14px;
    }

    .dm-video-info {
        padding: 15px 5px;
    }

    .dm-video-modal-content {
        width: 95%;
    }

    .dm-video-modal-close {
        top: -35px;
        font-size: 35px;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .dm-video-title {
        font-size: 18px;
    }

    .dm-video-description {
        font-size: 13px;
    }

    .dm-video-info {
        padding: 10px 5px;
    }

    .dm-video-play-btn svg {
        width: 60px;
        height: 60px;
    }

    .dm-video-modal-close {
        top: -30px;
        font-size: 32px;
        width: 32px;
        height: 32px;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .dm-video-modal {
        display: none;
    }
}
