/**
 * Simple YouTube Feed Styles
 * Version: 1.0.0
 * 
 * Uses CSS Grid for layout - supported in all modern browsers since 2017
 * No dependencies on external frameworks
 */

/* Container */
.sytf-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Title */
.sytf-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: inherit;
}

/* Grid Layout */
.sytf-grid {
    display: grid;
    gap: 24px;
}

/* Column variations */
.sytf-cols-1 { grid-template-columns: 1fr; }
.sytf-cols-2 { grid-template-columns: repeat(2, 1fr); }
.sytf-cols-3 { grid-template-columns: repeat(3, 1fr); }
.sytf-cols-4 { grid-template-columns: repeat(4, 1fr); }
.sytf-cols-5 { grid-template-columns: repeat(5, 1fr); }
.sytf-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* Video Card */
.sytf-video {
    display: flex;
    flex-direction: column;
}

.sytf-video-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.sytf-video-link:hover {
    transform: translateY(-4px);
}

.sytf-video-link:hover .sytf-thumbnail {
    opacity: 0.9;
}

/* Thumbnail */
.sytf-thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 12px;
    background-color: #1a1f3a; /* Background Panel from site palette */
}

.sytf-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

/* Play Icon Overlay */
.sytf-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.sytf-video-link:hover .sytf-play-icon {
    opacity: 1;
}

.sytf-play-bg {
    transition: fill 0.2s ease;
}

.sytf-video-link:hover .sytf-play-bg {
    fill: #cc0000;
}

/* Video Info */
.sytf-video-info {
    padding: 12px 4px;
}

.sytf-video-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 6px 0;
    color: inherit;
    
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sytf-video-date {
    font-size: 0.85rem;
    color: #9ba3af; /* Text Muted from site palette */
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .sytf-cols-5,
    .sytf-cols-6 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .sytf-cols-3,
    .sytf-cols-4,
    .sytf-cols-5,
    .sytf-cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sytf-grid {
        gap: 16px;
    }
    
    .sytf-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .sytf-cols-2,
    .sytf-cols-3,
    .sytf-cols-4,
    .sytf-cols-5,
    .sytf-cols-6 {
        grid-template-columns: 1fr;
    }
    
    .sytf-video-title {
        font-size: 1rem;
    }
}

/* Thumbnail placeholder background for dark theme */
.sytf-thumbnail-wrapper {
    background-color: #1a1f3a; /* Background Panel from site palette */
}

/* Error message styling handled inline in PHP for admin visibility */
