/* video-styles.css */

/* Video Feeds */
.video-feed-horizontal {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 16px;
    /* Space for scrollbar */
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.video-feed-horizontal::-webkit-scrollbar {
    display: none;
}

.video-feed-vertical {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.video-feed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    /* Approximately 5 items at 90-100px each */
    overflow-y: auto;
    padding-right: 8px;
    /* For scrollbar space */
}

/* Video Card */
.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    flex-shrink: 0;
    width: 280px;
    /* Default width for horizontal */
    display: flex;
    flex-direction: column;
}

.video-feed-vertical .video-card {
    width: 100%;
    /* Full width for vertical stack */
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* List View Variant */
.video-card.list-view {
    flex-direction: row;
    width: 100%;
    align-items: center;
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
}

.video-card.list-view:last-child {
    border-bottom: none;
}

.video-card.list-view .video-thumbnail-container {
    width: 120px;
    flex-shrink: 0;
    border-radius: 6px;
    aspect-ratio: 16 / 9;
}

.video-card.list-view .play-icon {
    padding: 6px;
}

.video-card.list-view .play-icon .material-symbols-rounded {
    font-size: 18px;
}

.video-card.list-view .video-info {
    padding: 8px 12px;
}

.video-card.list-view .video-title {
    font-size: 13px;
    -webkit-line-clamp: 2;
    margin-bottom: 4px;
}

.video-card.list-view .video-meta {
    font-size: 11px;
}

.video-card.list-view:hover {
    transform: none;
    background: var(--bg-hover);
    box-shadow: none;
}

.video-thumbnail-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.video-card:hover .video-thumbnail {
    opacity: 1;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 50%;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    transition: background 0.2s, transform 0.2s;
}

.video-card:hover .play-icon {
    background: rgba(220, 38, 38, 0.9);
    /* YouTube Red */
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.video-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.video-meta-secondary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.member-avatar-mini {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.member-avatar-mini.dem {
    border-color: var(--accent-blue);
}

.member-avatar-mini.rep {
    border-color: var(--accent-red);
}

/* Modal Overlay & Container */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: var(--bg-card);
    width: 95%;
    max-width: 900px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.open .modal-container {
    transform: scale(1);
}

/* Modal Video Player */
.video-modal-content {
    background: #000;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-player-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    background: #000;
}

.video-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-modal-info {
    padding: 24px;
    background: var(--bg-card);
    flex: 1;
    overflow-y: auto;
}

.video-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.video-modal-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.video-modal-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

/* Scroll Controls */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.2s;
    color: var(--text-primary);
}

.scroll-btn:hover {
    opacity: 1;
    background: var(--bg-hover);
}

.scroll-btn.left {
    left: 0;
    transform: translate(-50%, -50%);
}

.scroll-btn.right {
    right: 0;
    transform: translate(50%, -50%);
}