/**
 * Universal Video Card Styles
 * Works with includes/videocard.php component
 * Supports both Card and List view modes
 */

/* ============================================================================
   CARD VIEW MODE (Default Grid Layout)
   ============================================================================ */

.video-card-card-mode {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--card-bg, #1a1d29);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.video-card-card-mode:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.video-card-card-mode .video-thumb-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.video-card-card-mode .video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card-card-mode:hover .video-thumbnail {
    transform: scale(1.05);
}

.video-card-card-mode .play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.9;
    transition: all 0.3s ease;
    z-index: 5;
}

.video-card-card-mode:hover .play-icon-overlay {
    opacity: 0;
}

.video-card-card-mode .play-icon-overlay svg {
    width: 32px;
    height: 32px;
    margin-left: 4px;
}

.video-card-card-mode .video-card-info {
    padding: 12px;
    flex: 1;
}

.video-card-card-mode .video-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 6px 0;
    color: var(--text-primary, #ffffff);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.video-card-card-mode .video-title:hover {
    color: var(--ion-gold, #b28254);
}

.video-card-card-mode .breadcrumb {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary, #9ca3af);
    margin-top: 4px;
}

.video-card-card-mode .breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.video-card-card-mode .breadcrumb a:hover {
    color: var(--ion-gold, #b28254);
}

.video-card-card-mode .dot {
    margin: 0 6px;
    opacity: 0.5;
}

.video-card-card-mode .share-actions {
    padding: 0 12px 12px 12px;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
    margin-top: 8px;
}

/* ============================================================================
   LIST VIEW MODE (Horizontal Layout)
   ============================================================================ */

.video-card-list-mode {
    position: relative;
    display: flex;
    flex-direction: row;
    background: var(--card-bg, #1a1d29);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    min-height: 140px;
}

.video-card-list-mode:hover {
    background: var(--card-bg-hover, #222638);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.video-card-list-mode .video-thumb-container {
    position: relative;
    width: 240px;
    min-width: 240px;
    height: 100%;
    overflow: hidden;
    border-radius: 12px 0 0 12px;
}

.video-card-list-mode .video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card-list-mode:hover .video-thumbnail {
    transform: scale(1.05);
}

.video-card-list-mode .play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.9;
    transition: all 0.3s ease;
    z-index: 5;
}

.video-card-list-mode:hover .play-icon-overlay {
    opacity: 0;
}

.video-card-list-mode .play-icon-overlay svg {
    width: 28px;
    height: 28px;
    margin-left: 4px;
}

.video-card-list-mode .video-card-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.video-card-list-mode .video-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px 0;
    color: var(--text-primary, #ffffff);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.video-card-list-mode .video-title:hover {
    color: var(--ion-gold, #b28254);
}

.video-card-list-mode .breadcrumb {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary, #9ca3af);
    margin-top: 6px;
}

.video-card-list-mode .breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.video-card-list-mode .breadcrumb a:hover {
    color: var(--ion-gold, #b28254);
}

.video-card-list-mode .dot {
    margin: 0 6px;
    opacity: 0.5;
}

.video-card-list-mode .share-actions {
    padding: 0;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: auto;
}

/* ============================================================================
   COMMON STYLES (Both Modes)
   ============================================================================ */

.title-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.title-link:hover .video-title {
    color: var(--ion-gold, #b28254);
}

/* Video Reactions */
.video-reactions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.video-reactions.compact {
    gap: 6px;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-secondary, #9ca3af);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary, #ffffff);
}

.reaction-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.reaction-btn.like-btn.active {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.reaction-btn.dislike-btn.active {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.like-count, .dislike-count {
    font-size: 0.7rem;
    font-weight: 600;
}

/* Video Metadata (views, date) */
.video-views, .video-date {
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: var(--text-secondary, #9ca3af);
    font-size: 0.75rem;
    white-space: nowrap;
}

.video-views svg, .video-date svg {
    margin-right: 4px;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

/* Tablet */
@media (max-width: 768px) {
    .video-card-list-mode {
        flex-direction: column;
        min-height: auto;
    }
    
    .video-card-list-mode .video-thumb-container {
        width: 100%;
        height: 180px;
        border-radius: 12px 12px 0 0;
    }
    
    .video-card-list-mode .video-card-info {
        padding: 12px;
    }
    
    .video-card-list-mode .video-title {
        font-size: 0.95rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .video-card-card-mode .video-title {
        font-size: 0.9rem;
    }
    
    .video-card-card-mode .video-card-info {
        padding: 10px;
    }
    
    .video-card-card-mode .share-actions {
        padding: 0 10px 10px 10px;
        gap: 6px;
    }
    
    .reaction-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .reaction-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* ============================================================================
   THEME SUPPORT (Light Mode)
   ============================================================================ */

[data-theme="light"] .video-card-card-mode,
[data-theme="light"] .video-card-list-mode,
html.light-mode .video-card-card-mode,
html.light-mode .video-card-list-mode {
    background: #ffffff;
    color: #1a1d29;
}

[data-theme="light"] .video-title,
html.light-mode .video-title {
    color: #1a1d29;
}

[data-theme="light"] .breadcrumb,
html.light-mode .breadcrumb {
    color: #6b7280;
}

[data-theme="light"] .reaction-btn,
html.light-mode .reaction-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #6b7280;
}

[data-theme="light"] .reaction-btn:hover,
html.light-mode .reaction-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
    color: #1a1d29;
}

[data-theme="light"] .share-actions,
html.light-mode .share-actions {
    border-top-color: rgba(0, 0, 0, 0.05);
}

