/* YouTube Live Scheduler - Frontend Styles */

/* Container Geral */
.yls-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Loading */
.yls-loading {
    text-align: center;
    padding: 60px 20px;
}

.yls-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff0000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error & Empty States */
.yls-error, .yls-empty {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

.yls-error-message {
    color: #d32f2f;
    font-weight: 500;
}

/* Badge */
.yls-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yls-badge-next {
    background: #ff0000;
    color: white;
}

/* Template: Featured */
.yls-template-featured .yls-featured-video {
    margin-bottom: 40px;
    position: relative;
}

.yls-template-featured .yls-featured-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: #000;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.yls-template-featured .yls-featured-thumbnail:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.yls-template-featured .yls-featured-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yls-template-featured .yls-featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    transition: opacity 0.3s;
}

.yls-template-featured .yls-featured-thumbnail:hover .yls-featured-overlay {
    opacity: 1;
}

.yls-template-featured .yls-play-button {
    transition: transform 0.3s;
}

.yls-template-featured .yls-featured-thumbnail:hover .yls-play-button {
    transform: scale(1.1);
}

.yls-template-featured .yls-watch-text {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.yls-template-featured .yls-featured-info {
    padding: 20px 0;
}

.yls-template-featured .yls-featured-title {
    font-size: 32px;
    font-weight: 700;
    margin: 10px 0;
    color: #1a1a1a;
    line-height: 1.3;
}

.yls-template-featured .yls-featured-date {
    color: #666;
    font-size: 18px;
    margin: 12px 0;
}

.yls-template-featured .yls-featured-description {
    color: #444;
    font-size: 16px;
    line-height: 1.6;
    margin: 15px 0;
}

.yls-template-featured .yls-section-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1a1a1a;
    border-bottom: 2px solid #ff0000;
    padding-bottom: 10px;
}

.yls-template-featured .yls-upcoming-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.yls-template-featured .yls-upcoming-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.yls-template-featured .yls-upcoming-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.yls-template-featured .yls-upcoming-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: #000;
}

.yls-template-featured .yls-upcoming-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yls-template-featured .yls-upcoming-date {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.yls-template-featured .yls-upcoming-info {
    padding: 15px;
}

.yls-template-featured .yls-upcoming-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1a1a1a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yls-template-featured .yls-upcoming-time {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Template: Grid */
.yls-template-grid .yls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.yls-template-grid .yls-grid-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
}

.yls-template-grid .yls-grid-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.yls-template-grid .yls-grid-item.yls-next-live {
    border: 2px solid #ff0000;
}

.yls-template-grid .yls-grid-item .yls-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.yls-template-grid .yls-grid-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: #000;
}

.yls-template-grid .yls-grid-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.yls-template-grid .yls-grid-item:hover .yls-grid-thumbnail img {
    transform: scale(1.05);
}

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

.yls-template-grid .yls-grid-item:hover .yls-grid-overlay {
    opacity: 1;
}

.yls-template-grid .yls-play-icon {
    font-size: 48px;
    color: white;
}

.yls-template-grid .yls-grid-info {
    padding: 20px;
}

.yls-template-grid .yls-grid-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #1a1a1a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yls-template-grid .yls-grid-date {
    color: #666;
    font-size: 14px;
    margin: 8px 0;
}

.yls-template-grid .yls-grid-description {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    margin: 10px 0 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Template: List */
.yls-template-list .yls-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.yls-template-list .yls-list-item {
    display: flex;
    gap: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    position: relative;
}

.yls-template-list .yls-list-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.yls-template-list .yls-list-item.yls-next-live {
    border: 2px solid #ff0000;
}

.yls-template-list .yls-list-item .yls-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.yls-template-list .yls-list-thumbnail {
    flex-shrink: 0;
    width: 320px;
    position: relative;
    background: #000;
}

@media (max-width: 768px) {
    .yls-template-list .yls-list-item {
        flex-direction: column;
    }
    
    .yls-template-list .yls-list-thumbnail {
        width: 100%;
        padding-bottom: 56.25%;
    }
}

.yls-template-list .yls-list-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yls-template-list .yls-list-info {
    padding: 20px;
    flex: 1;
}

.yls-template-list .yls-list-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #1a1a1a;
}

.yls-template-list .yls-list-date {
    color: #666;
    font-size: 15px;
    margin: 8px 0;
}

.yls-template-list .yls-list-description {
    color: #555;
    line-height: 1.6;
    margin: 12px 0;
}

.yls-watch-button {
    display: inline-block;
    padding: 10px 20px;
    background: #ff0000;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

.yls-watch-button:hover {
    background: #cc0000;
    color: white;
}

/* Template: Carousel */
.yls-template-carousel .yls-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.yls-template-carousel .yls-carousel {
    flex: 1;
    overflow: hidden;
    border-radius: 12px;
}

.yls-template-carousel .yls-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.yls-template-carousel .yls-carousel-item {
    min-width: 100%;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.yls-template-carousel .yls-carousel-item.yls-next-live {
    border: 2px solid #ff0000;
}

.yls-template-carousel .yls-carousel-item .yls-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.yls-template-carousel .yls-carousel-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    background: #000;
}

.yls-template-carousel .yls-carousel-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yls-template-carousel .yls-carousel-info {
    padding: 24px;
}

.yls-template-carousel .yls-carousel-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #1a1a1a;
}

.yls-template-carousel .yls-carousel-date {
    color: #666;
    font-size: 16px;
    margin: 8px 0;
}

.yls-template-carousel .yls-carousel-description {
    color: #555;
    line-height: 1.6;
    margin: 12px 0;
}

.yls-carousel-prev,
.yls-carousel-next {
    background: #ff0000;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.yls-carousel-prev:hover,
.yls-carousel-next:hover {
    background: #cc0000;
}

.yls-carousel-dots {
    text-align: center;
    padding: 20px 0;
}

.yls-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.yls-dot.active {
    background: #ff0000;
}

/* Icon */
.yls-icon {
    margin-right: 4px;
}


/* Modal de Vídeo */
.yls-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.yls-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.yls-modal-content {
    position: relative;
    max-width: 1400px;
    width: 90%;
    max-height: 90vh;
    margin: 5vh auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.yls-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    line-height: 40px;
    padding: 0;
    z-index: 10;
    transition: transform 0.2s;
}

.yls-modal-close:hover {
    transform: scale(1.2);
}

.yls-modal-body {
    max-height: 90vh;
    overflow-y: auto;
}

.yls-modal-video-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background: #000;
}

.yls-modal-video-wrapper.with-chat {
    grid-template-columns: 2fr 1fr;
}

@media (max-width: 968px) {
    .yls-modal-video-wrapper.with-chat {
        grid-template-columns: 1fr;
    }
    
    .yls-modal-chat-embed {
        display: none !important;
    }
}

.yls-modal-video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.yls-modal-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.yls-modal-chat-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.yls-modal-chat-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.yls-modal-info {
    padding: 24px;
}

.yls-modal-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1a1a1a;
}

.yls-modal-date {
    color: #666;
    font-size: 16px;
    margin: 8px 0;
}

.yls-modal-description {
    color: #444;
    line-height: 1.6;
    margin: 12px 0 0 0;
}

body.yls-modal-open {
    overflow: hidden;
}

/* Cursor pointer para itens clicáveis */
.yls-grid-item,
.yls-upcoming-item,
.yls-list-item,
.yls-carousel-item {
    cursor: pointer;
}
