/* YT Videos Grid Block Styles */
.yt-videos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.yt-video-item {
    display: block;
    text-decoration: none;
}

.yt-video-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.yt-video-link:hover {
    text-decoration: none;
    color: inherit;
}

.yt-video-thumbnail {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 15px;
    aspect-ratio: 16/9;
}

.yt-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.yt-video-title {
    font-size: 14px;
    font-weight: 700;
    color: #353535;
    line-height: 1.5;
    text-decoration: none;
	margin-top: 4px!important
}

.yt-video-link:hover .yt-video-title {
    color: #0f0f0f;
    text-decoration: none;
}

/* Tablet Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .yt-videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .yt-videos-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .yt-video-title {
        font-size: 14px;
    }
}

/* Infinity Loader Styles */
.yt-videos-loader {
    text-align: center;
    margin-top: 32px;
    padding: 20px;
}

.yt-videos-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.yt-videos-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff0000;
    border-radius: 50%;
    animation: yt-spin 1s linear infinite;
}

@keyframes yt-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.yt-videos-loading p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.yt-videos-load-more {
    display: none; /* Hidden since we're using automatic loading */
    background-color: #ff0000;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.yt-videos-load-more:hover {
    background-color: #cc0000;
}

.yt-videos-load-more:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Update mobile styles for loader */
@media (max-width: 768px) {
    .yt-videos-loader {
        margin-top: 24px;
        padding: 16px;
    }

    .yt-videos-load-more {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Block Editor Preview Styles */
.yt-videos-block-preview {
    border: 1px dashed #ccc !important;
    padding: 20px !important;
    text-align: center !important;
    background-color: #f9f9f9 !important;
    border-radius: 4px;
}
