/* 
 * Video Thumbnail Component Styles
 * Consistent video thumbnail display across the entire site
 */

/* Base card container */
.video-thumbnail-card {
    position: relative;
    background: var(--bg-card, #1f1f1f);
    border-radius: 12px;
    overflow: hidden;  /* Changed from visible to hidden to clip content to border radius */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;  /* Removed border to match hero images */
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-thumbnail-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Link wrapper */
.video-thumbnail-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Thumbnail wrapper with 16:9 aspect ratio */
.video-thumbnail-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
    border-radius: 12px 12px 0 0;  /* Match the card's border radius on top */
}

.video-thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-thumbnail-card:hover .video-thumbnail-wrapper img {
    transform: scale(1.05);
}

/* Duration badge */
.video-duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 2;
}

/* Badge container - HIDDEN (no longer displayed on images) */
.video-badge-container {
    display: none;  /* Hide badges from thumbnail images */
}

/* Individual badges - HIDDEN */
.video-badge {
    display: none;  /* Hide badges from thumbnail images */
}

/* Badge styles */
.badge-new {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.badge-exclusive {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.85) 0%, rgba(245, 87, 108, 0.85) 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(240, 147, 251, 0.4);
}

.badge-rare-footage {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.85) 0%, rgba(0, 242, 254, 0.85) 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(79, 172, 254, 0.4);
}

.badge-historic {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.85) 0%, rgba(56, 249, 215, 0.85) 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(67, 233, 123, 0.4);
}

.badge-popular {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.85) 0%, rgba(247, 147, 30, 0.85) 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.4);
}

/* Video info section */
.video-thumbnail-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Video title */
.video-thumbnail-title {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
    color: var(--text-primary, #ffffff);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

/* Video metadata */
.video-thumbnail-meta {
    font-size: 0.8rem;
    color: var(--text-secondary, #9ca3af);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.video-meta-item {
    display: inline-block;
}

/* Grid layouts for different contexts */

/* Standard video grid */
.video-grid .video-thumbnail-card {
    width: 100%;
}

/* Carousel layout */
.carousel-items .video-thumbnail-card {
    flex: 0 0 calc(20% - 12px);
    min-width: 200px;
    max-width: 280px;
}

/* More videos grid (watch page) */
.more-grid .video-thumbnail-card {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .carousel-items .video-thumbnail-card {
        flex: 0 0 calc(25% - 12px);
    }
}

@media (max-width: 1200px) {
    .carousel-items .video-thumbnail-card {
        flex: 0 0 calc(25% - 12px);
    }
}

@media (max-width: 992px) {
    .carousel-items .video-thumbnail-card {
        flex: 0 0 calc(33.333% - 12px);
    }
}

@media (max-width: 768px) {
    .carousel-items .video-thumbnail-card {
        flex: 0 0 calc(50% - 12px);
    }
    
    .video-thumbnail-title {
        font-size: 0.9rem;
    }
    
    .video-thumbnail-meta {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .carousel-items .video-thumbnail-card {
        flex: 0 0 calc(100% - 12px);
    }
}

/* Animation on hover for badges */
.video-thumbnail-card:hover .video-badge {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.5);
}

/* Watch Progress Bar */
.video-progress-bar {
    position: relative;
    margin-top: -4px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.video-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8 0%, #0284c7 100%);
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Add a subtle animation to indicate watched content */
.video-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3) 50%,
        transparent
    );
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Make progress bar more visible on hover */
.video-thumbnail-card:hover .video-progress-bar {
    height: 5px;
}

.video-thumbnail-card:hover .video-progress-fill {
    background: linear-gradient(90deg, #7dd3fc 0%, #38bdf8 100%);
}

/* Add watched indicator for fully watched videos */
.video-progress-fill[style*="width: 100%"],
.video-progress-fill[style*="width: 99%"],
.video-progress-fill[style*="width: 98%"],
.video-progress-fill[style*="width: 97%"],
.video-progress-fill[style*="width: 96%"],
.video-progress-fill[style*="width: 95%"] {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.video-thumbnail-card:hover .video-progress-fill[style*="width: 100%"],
.video-thumbnail-card:hover .video-progress-fill[style*="width: 99%"],
.video-thumbnail-card:hover .video-progress-fill[style*="width: 98%"],
.video-thumbnail-card:hover .video-progress-fill[style*="width: 97%"],
.video-thumbnail-card:hover .video-progress-fill[style*="width: 96%"],
.video-thumbnail-card:hover .video-progress-fill[style*="width: 95%"] {
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
}