/**
 * Public CSS
 *
 * @package Livestream_Video
 */

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

/* ====================
   Featured Video (Row 1)
==================== */
.lsv-featured-video {
    position: relative;
    margin-bottom: 40px;
}

.lsv-video-wrapper {
    position: relative;
}

.aspect-ratio-16-9 {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

.lsv-embed-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

.lsv-loading,
.lsv-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    text-align: center;
}

.lsv-error {
    color: #f44336;
}

/* ====================
   Overlay Panel
==================== */
.lsv-overlay-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 32px;
    border-radius: 8px 0 0 0;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.lsv-overlay-panel.hidden {
    opacity: 0;
    pointer-events: none;
}

.lsv-overlay-content {
    font-size: 14px;
}

.lsv-video-meta {
    margin-bottom: 15px;
}

.platform-badge,
.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 8px;
    font-weight: 600;
}

.platform-badge.platform-facebook {
    background: #1877f2;
    color: white;
}

.platform-badge.platform-tiktok {
    background: #000;
    color: white;
}

.platform-badge.platform-youtube {
    background: #ff0000;
    color: white;
}

.category-badge {
    background: #ff6b6b;
    color: white;
}

.lsv-video-title {
    color: var(--Base-White, #FFF);

    /* Display xs/Semibold */
    font-family: Inter;
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 32px;
    /* 133.333% */
}

.lsv-video-description {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    opacity: 0.9;
}

.lsv-author-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.lsv-author-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.lsv-author-info p,
.lsv-stream-info p,
.lsv-calendar p {
    color: var(--Base-White, #FFF);

    /* Text sm/Semibold */
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px;
    /* 142.857% */
    margin-bottom: 0;
    padding-bottom: 10px;
}

.lsv-author-info span,
.lsv-stream-info span,
.lsv-calendar span {
    color: var(--Base-White, #FFF);

    /* Text sm/Semibold */
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px;
    /* 142.857% */
}



/* ====================
   Row 2 Layout
==================== */
.lsv-row-2 {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .lsv-row-2 {
        grid-template-columns: 1fr;
    }
}

/* ====================
   Sidebar
==================== */
.lsv-sidebar {

    height: fit-content;
}

.lsv-search-box {
    margin-bottom: 25px;
}

.lsv-search-input {
    width: 100%;
    border-radius: 8px !important;
    border: 1px solid var(--Gray-300, #D5D7DA) !important;
    background: var(--Base-White, #FFF) !important;

    /* Shadows/shadow-xs */
    box-shadow: 0 1px 2px 0 rgba(10, 13, 18, 0.05) !important;
    margin-bottom: 0 !important;
}

.lsv-search-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

.lsv-categories h3 {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 700;
}

.lsv-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lsv-categories ul li {
    padding: 8px 12px;
    margin-left: 0 !important;
    margin-bottom: 4px;
}

.lsv-category-link {
    color: var(--Status-common, #FDFBF7);

    /* Text md/Semibold */
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
    /* 150% */
}

.lsv-categories ul li:hover {
    border-radius: 6px;
    background: var(--Primary-main, #1C5350);
}

.lsv-categories ul li:hover a {
    color: var(--Secondary-lighter, #D4AF37);
}

.lsv-categories ul li.active {
    border-radius: 6px;
    background: var(--Primary-main, #1C5350);

    /* Text md/Semibold */
}

.lsv-categories ul li.active a {
    color: var(--Secondary-lighter, #D4AF37);
}

/* ====================
   Video Grid
==================== */
.lsv-grid-container {
    position: relative;
}

.lsv-video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 48px;
    transition: opacity 0.3s;
}

@media (max-width: 768px) {
    .lsv-video-grid {
        grid-template-columns: 1fr;
    }
}

.lsv-video-grid.loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
    min-height: 200px;
}

.lsv-video-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ====================
   Video Card
==================== */
.lsv-video-card {

    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.lsv-video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ====================
   Video Card Thumbnail
==================== */
.lsv-card-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

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

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

.lsv-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
    /* Always visible */
    transition: opacity 0.3s, transform 0.3s;
    z-index: 2;
}

.lsv-video-card:hover .lsv-play-overlay {
    opacity: 1;
    /* Full opacity on hover */
    transform: translate(-50%, -50%) scale(1.1);
    /* Slight zoom on hover */
}

.play-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.duration-badge {
    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;
    z-index: 1;
}

/* ====================
   Video Card Details
==================== */
.lsv-card-details {
    padding: 15px;
}

.lsv-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-radius: 16px;
    border: 1px solid #C6DAFF;
    background: #EEF4FF;
    width: fit-content;
    padding: 4px 8px;
}

.lsv-card-meta .category {
    border-radius: 16px;
    border: 1px solid #C6DAFF;
    background: var(--Base-White, #FFF);
    color: #335CFF;
    text-align: center;
    font-family: Inter;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 18px;
    padding: 2px 8px;
}

.lsv-card-title {
    color: var(--Status-Active, #FFD9BE);

    /* Text lg/Semibold */
    font-family: Inter;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 28px;
    /* 155.556% */
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lsv-card-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.lsv-card-author {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.lsv-card-author img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    color: var(--Status-common, #FDFBF7);

    /* Text sm/Semibold */
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px;
    /* 142.857% */
    ;
}

.post-date {
    color: var(--text-grey, #C3C3C3);

    /* Text sm/Regular */
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    /* 142.857% */
}

/* ====================
   Pagination
==================== */
.lsv-pagination {
    margin-top: 30px;
    text-align: center;
}

.lsv-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 5px;
}

.lsv-pagination li {
    display: inline-block;
}

.lsv-pagination a,
.lsv-pagination span {
    display: block;
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}

.lsv-pagination a:hover {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}

.lsv-pagination .current {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}

/* ====================
   No Results
==================== */
.lsv-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* ====================
   Responsive Adjustments
==================== */
@media (max-width: 768px) {
    .lsv-overlay-panel {
        width: 100%;
        border-radius: 8px 8px 0 0;
    }

    .lsv-video-title {
        font-size: 20px;
    }

    .lsv-sidebar {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .lsv-container {
        padding: 10px;
    }

    .lsv-video-title {
        font-size: 18px;
    }

    .lsv-overlay-panel {
        padding: 15px;
    }
}

.flex-info-lvs {
    display: flex;
    gap: 32px;
}

.lsv-search-box input {
    border-radius: 8px;
    border: 1px solid var(--Gray-300, #D5D7DA);
    background: var(--Base-White, #FFF);
    box-shadow: 0 1px 2px 0 rgba(10, 13, 18, 0.05);
}

.lsv-categories h3 {
    color: var(--Secondary-lighter, #D4AF37);

    /* Text sm/Semibold */
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px;
    /* 142.857% */
}