/* ================================
   VIDEO CONTENT BANK - FRONTEND STYLES
   ================================ */

/* Reset */
.vcb-tabs-container *,
.vcb-category-container *,
.vcb-single-container * {
    box-sizing: border-box;
}

/* ================================
   TABS LAYOUT - DESKTOP
   ================================ */
.vcb-tabs-container {
    display: flex;
    gap: 20px;
    width: 100%;
}

.vcb-sidebar {
    width: 20%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 10px;
    align-self: stretch;
}

.vcb-sidebar::-webkit-scrollbar {
    width: 6px;
}

.vcb-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.vcb-sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.vcb-sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.vcb-tab-item {
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    font-size: 16px;
    text-align: left;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

.vcb-tab-item:focus,
.vcb-tab-item:active,
.vcb-tab-item:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.vcb-tab-item:hover:not(.active),
.vcb-tab-item:focus:not(.active) {
    opacity: 0.8;
}

.vcb-accordion {
    display: none;
}

.vcb-content-area {
    width: 80%;
}

.vcb-content-section {
    display: none;
}

.vcb-content-section.active {
    display: block;
}

/* ================================
   ACCORDION - MOBILE
   ================================ */
@media (max-width: 768px) {
    .vcb-tabs-container {
        flex-direction: column;
    }
    
    .vcb-sidebar {
        display: none;
    }
    
    .vcb-accordion {
        display: block;
        width: 100%;
    }
    
    .vcb-content-area {
        display: none;
    }
    
    .vcb-accordion-item {
        margin-bottom: 10px;
    }
    
    .vcb-accordion-header {
        width: 100%;
        padding: 15px 20px;
        /* Styles inherited from tab customization via inline CSS */
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 16px;
        text-align: left;
        outline: none;
        transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
        -webkit-tap-highlight-color: transparent !important;
        tap-highlight-color: transparent !important;
        -webkit-user-select: none;
        user-select: none;
        /* Force disable theme colors */
        background-color: inherit !important;
        color: inherit !important;
    }
    
    .vcb-accordion-header:focus,
    .vcb-accordion-header:active,
    .vcb-accordion-header:focus-visible {
        outline: none !important;
        box-shadow: none !important;
        -webkit-tap-highlight-color: transparent !important;
        background-color: inherit !important;
        color: inherit !important;
    }
    
    .vcb-accordion-header:hover {
        background-color: inherit !important;
        color: inherit !important;
    }
    
    .vcb-accordion-icon {
        transition: transform 0.3s ease;
        fill: none !important;
    }
    
    .vcb-accordion-icon path {
        fill: none !important;
    }
    
    .vcb-accordion-item.active .vcb-accordion-icon {
        transform: rotate(180deg);
    }
    
    .vcb-accordion-item.active .vcb-accordion-header {
        background-color: inherit !important;
        color: inherit !important;
    }
    
    .vcb-accordion-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .vcb-accordion-item.active .vcb-accordion-content {
        max-height: 10000px;
        padding-top: 15px;
    }
}

/* ================================
   VIDEO GRID
   ================================ */
.vcb-videos-wrapper {
    width: 100%;
}

.vcb-videos-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

/* Desktop: 4 cols x 2 rows by default */
.vcb-videos-grid {
    grid-template-columns: repeat(4, 1fr);
}

.vcb-video-item {
    /* Items are controlled by pagination JS */
    display: none; /* Ukryte domyślnie - paginacja pokaże właściwe */
}

/* Mobile: 2 cols by default */
@media (max-width: 768px) {
    .vcb-videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ================================
   VIDEO CARD
   ================================ */
.vcb-video-card {
    width: 100%;
}

.vcb-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.vcb-video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vcb-video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.vcb-video-card.playing .vcb-video-poster {
    opacity: 0;
}

.vcb-video-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;
    z-index: 2;
    transition: background 0.3s ease;
    pointer-events: none;
}

.vcb-video-card:hover .vcb-video-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.vcb-video-card.playing .vcb-video-overlay {
    /* Keep overlay visible but just change opacity of background */
    background: rgba(0, 0, 0, 0.1);
}

.vcb-play-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    outline: none;
    padding: 0;
    transition: transform 0.3s ease;
    pointer-events: auto;
}

.vcb-play-btn:hover,
.vcb-play-btn:focus,
.vcb-play-btn:active {
    transform: scale(1.1);
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

.vcb-video-title {
    margin: 10px 0 0;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ================================
   PAGINATION
   ================================ */
.vcb-pagination {
    margin-top: 30px;
}

.vcb-pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vcb-pagination-btn {
    padding: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    font-size: 14px;
    min-width: 44px;
    height: 44px;
    text-align: center;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vcb-pagination-btn:hover,
.vcb-pagination-btn:focus,
.vcb-pagination-btn:active {
    outline: none !important;
    box-shadow: none !important;
    color: inherit;
}

.vcb-pagination-btn:active {
    transform: scale(0.95);
}

.vcb-pagination-btn.active {
    /* Active state styles from dynamic CSS */
}

.vcb-pagination-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.vcb-pagination-prev,
.vcb-pagination-next {
    font-weight: normal;
    font-size: 16px;
}

@media (max-width: 768px) {
    .vcb-pagination-container {
        gap: 6px;
    }
    
    .vcb-pagination-btn {
        min-width: 40px;
        height: 40px;
        font-size: 13px;
    }
    
    .vcb-pagination-prev,
    .vcb-pagination-next {
        font-size: 14px;
    }
}

/* ================================
   LIGHTBOX - DESKTOP
   ================================ */
.vcb-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 99999;
}

.vcb-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vcb-lightbox-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vcb-lightbox-video {
    width: 100%;
    height: auto;
    max-height: 100vh;
}

.vcb-lightbox-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.vcb-lightbox-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    pointer-events: auto;
}

.vcb-lightbox-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: auto;
}

.vcb-lightbox-title {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    max-width: 300px;
    pointer-events: auto;
    word-wrap: break-word;
}

.vcb-lightbox-btn {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

.vcb-lightbox-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.vcb-lightbox-btn:active,
.vcb-lightbox-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

.vcb-lightbox-btn svg {
    width: 24px;
    height: 24px;
}

.vcb-lightbox-nav {
    position: absolute;
    right: -80px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vcb-lightbox-nav-btn {
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

.vcb-lightbox-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.vcb-lightbox-nav-btn:active,
.vcb-lightbox-nav-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

.vcb-lightbox-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.vcb-lightbox-nav-btn svg {
    width: 28px;
    height: 28px;
}

/* Mobile lightbox */
@media (max-width: 768px) {
    .vcb-lightbox-container {
        max-width: 100%;
    }
    
    .vcb-lightbox-nav {
        display: none;
    }
    
    .vcb-lightbox-counter {
        top: 20px;
        left: 20px;
    }
    
    .vcb-lightbox-actions {
        top: 20px;
        right: 20px;
        gap: 10px;
    }
    
    .vcb-lightbox-btn {
        border: none;
    }
    
    .vcb-lightbox-title {
        bottom: 20px;
        left: 20px;
        right: auto;
        max-width: calc(100% - 40px);
    }
}

/* ================================
   SINGLE VIDEO CONTAINER
   ================================ */
.vcb-single-container {
    max-width: 400px;
    margin: 0 auto;
}

.vcb-category-container {
    width: 100%;
}
