/* Kiosk Videos Shortcode Styles */

.kiosk-videos {
    margin: 20px 0;
    font-family: inherit;
}

.kiosk-videos-error,
.kiosk-videos-empty {
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #6c757d;
    text-align: center;
    margin: 20px 0;
}

.kiosk-videos-empty {
    background-color: #e9ecef;
    border-color: #ced4da;
}

/* Video List - Full Width Layout */
.video-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 30px;
}

/* Individual Video Items */
.video-item {
    width: 100%;
}

/* Video Link Items */
.video-item.video-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 0;
    background: #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.video-item.video-link:hover {
    transform: translateY(-2px);
}

/* Video Link Wrapper */
.video-link-wrapper {
    margin-bottom: 15px;
    width: 100%;
}

/* Video Link */
.video-link {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
}

.video-link:hover {
    text-decoration: none;
    transform: scale(1.02);
}

.video-link:focus {
    outline: 2px solid #145A7B;
    outline-offset: 4px;
    border-radius: 8px;
}

/* Video Thumbnail */
.video-thumbnail {
    border: 1px solid rgba(0,0,0,0.5);
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
    aspect-ratio: 16/9;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.video-thumbnail.no-thumbnail {
    background: linear-gradient(135deg, #145A7B, #0f4a6b);
}

.video-item:hover .video-thumbnail {
    transform: scale(1.05);
}

/* Thumbnail Image */
.thumbnail-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

/* Play Button Overlay */
.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(20, 90, 123, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.video-item:hover .play-button-overlay {
    background: rgba(20, 90, 123, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Play Icon */
.play-icon {
    color: white;
    font-size: 24px;
    margin-left: 4px; /* Slight offset to center the triangle */
    font-weight: bold;
}

/* Video Title */
.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin: 0;
    word-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    width: 100%;
}

.video-item:hover .video-title {
    color: #145A7B;
}

/* Video Embed Items */
.video-item.video-embed {
    width: 100%;
}

/* Video Embed Wrapper */
.video-embed-wrapper {
    width: 100%;
}

/* Video Embed */
.video-embed {
    width: 100%;
    margin-bottom: 15px;
}

.video-embed iframe {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 8px;
}

/* Video Title for Embeds */
.video-embed-wrapper .video-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    padding: 15px 0;
    max-width: 100%;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-list {
        gap: 30px;
    }
    
    .video-item.video-link {
        padding: 15px 0;
    }
    
    .video-thumbnail {
        max-width: 100%;
    }
    
    .play-button-overlay {
        width: 60px;
        height: 60px;
    }
    
    .play-icon {
        font-size: 18px;
    }
    
    .video-title {
        font-size: 1rem;
    }
    
    .video-embed iframe {
        height: 250px;
    }
    
    .video-embed-wrapper .video-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .kiosk-videos {
        margin: 15px 0;
    }
    
    .video-list {
        gap: 20px;
    }
    
    .video-item.video-link {
        padding: 12px 0;
    }
    
    .video-thumbnail {
        max-width: 100%;
    }
    
    .play-button-overlay {
        width: 50px;
        height: 50px;
    }
    
    .play-icon {
        font-size: 16px;
    }
    
    .video-title {
        font-size: 0.9rem;
    }
    
    .video-embed iframe {
        height: 200px;
    }
    
    .video-embed-wrapper .video-title {
        font-size: 1rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .kiosk-videos-error,
    .kiosk-videos-empty {
        background-color: #343a40;
        border-color: #495057;
        color: #adb5bd;
    }
    
    .video-item.video-link {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .video-thumbnail {
        background: #4a5568;
    }
    
    .video-thumbnail.no-thumbnail {
        background: linear-gradient(135deg, #2d3748, #1a202c);
    }
    
    .play-button-overlay {
        background: rgba(99, 179, 237, 0.9);
    }
    
    .video-item:hover .play-button-overlay {
        background: rgba(99, 179, 237, 1);
    }
    
    .video-title {
        color: #f7fafc;
    }
    
    .video-item:hover .video-title {
        color: #63b3ed;
    }
    
    .video-embed-wrapper .video-title {
        color: #f7fafc;
    }
}

/* Print Styles */
@media print {
    .kiosk-videos {
        margin: 0;
    }
    
    .video-list {
        gap: 20px;
    }
    
    .video-item.video-link {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
        background: transparent;
    }
    
    .video-thumbnail {
        background: transparent;
    }
    
    .play-button-overlay {
        display: none;
    }
    
    .video-title {
        color: #000;
    }
    
    .video-embed {
        display: none;
    }
}
