/**
 * VCB Video Player Styles - Minimal & Beautiful
 * Styles for the video player embedded in WordPress posts
 */

/* Main Wrapper - Minimal Design */
.vcb-video-wrapper {
    max-width: 100%;
    margin: 1.5rem 0 2rem 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

/* Minimal Header */
.vcb-video-header-minimal {
    margin-bottom: 1rem;
    padding: 0;
}

.vcb-video-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.vcb-video-title {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a !important;
    line-height: 1.5;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
}

/* Dark mode title color */
@media (prefers-color-scheme: dark) {
    .vcb-video-title {
        color: #f0f0f0 !important;
    }
}

.vcb-video-size-badge {
    display: inline-flex !important;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #f0f4f8 !important;
    border: 2px solid #cbd5e0 !important;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #2d3748 !important;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vcb-video-size-badge:hover {
    background: #e2e8f0 !important;
    border-color: #a0aec0 !important;
    color: #1a202c !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Minimal Episode Selector */
.vcb-episode-selector-minimal {
    display: flex !important;
    gap: 0.875rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Custom Dropdown */
.vcb-dropdown {
    position: relative;
    flex: 1;
    min-width: 180px;
}

.vcb-dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1a202c;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    text-align: left;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    font-family: inherit;
}

.vcb-dropdown-trigger:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.12);
}

.vcb-dropdown-trigger:focus,
.vcb-dropdown.open .vcb-dropdown-trigger {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.vcb-dropdown-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.vcb-dropdown-arrow {
    flex-shrink: 0;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.vcb-dropdown.open .vcb-dropdown-arrow {
    transform: rotate(180deg);
}

.vcb-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    z-index: 100;
    max-height: 260px;
    overflow-y: auto;
    padding: 4px;
    display: none;
    animation: vcb-dd-slide 0.15s ease;
}

.vcb-dropdown.open .vcb-dropdown-menu {
    display: block;
}

@keyframes vcb-dd-slide {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vcb-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.12s ease;
    user-select: none;
}

.vcb-dropdown-item:hover {
    background: #f3f4f6;
}

/* Active season checkmark */
.vcb-dropdown-item.vcb-dd-active {
    color: #667eea;
    font-weight: 600;
    background: #f0f4ff;
}

.vcb-dd-check {
    color: #667eea;
    flex-shrink: 0;
}

/* Current episode — non-clickable */
.vcb-dropdown-item.vcb-dd-current {
    background: #f0f4ff;
    color: #667eea;
    font-weight: 600;
    cursor: default;
    pointer-events: none;
    opacity: 0.85;
}

.vcb-dd-now {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: #667eea;
    padding: 2px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}

/* Scrollbar for dropdown menu */
.vcb-dropdown-menu::-webkit-scrollbar {
    width: 5px;
}

.vcb-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.vcb-dropdown-menu::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

/* Video Player Wrapper */
.vcb-video-player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    background: #000000;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 0;
    transition: box-shadow 0.3s ease;
}

.vcb-video-player-wrapper:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.12);
}

.vcb-video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    outline: none;
    background: #000000;
    border-radius: 14px;
    border: none;
}

/* Pre-roll click interceptor */
.vcb-preroll-interceptor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.3s ease;
}

.vcb-preroll-interceptor:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* Remove series info section - not needed in minimal design */

/* Error Messages */
.vcb-error,
.vcb-error-message {
    padding: 1.5rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    margin: 1rem 0;
}

.vcb-error-message p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vcb-video-wrapper {
        margin: 1rem 0;
    }

    .vcb-video-title {
        font-size: 1.125rem;
    }

    .vcb-video-size-badge {
        font-size: 0.8125rem;
        padding: 0.25rem 0.625rem;
    }

    .vcb-episode-selector-minimal {
        flex-direction: column;
        gap: 0.625rem;
    }

    .vcb-dropdown {
        min-width: 100%;
    }

    .vcb-video-player-wrapper {
        border-radius: 8px;
    }

    .vcb-ad-skip-container {
        bottom: 60px;
        right: 10px;
    }

    .vcb-ad-skip-btn {
        padding: 6px 14px;
        font-size: 0.8125rem;
        min-width: 85px;
    }

    .vcb-ad-display-text {
        bottom: 100px;
        font-size: 0.8125rem;
    }
}

/* Dark Mode Support (if theme supports it) */
@media (prefers-color-scheme: dark) {
    .vcb-video-title {
        color: #f0f0f0 !important;
    }

    .vcb-video-size-badge {
        background: rgba(255, 255, 255, 0.15) !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
        color: #ffffff !important;
    }

    .vcb-video-size-badge:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        border-color: rgba(255, 255, 255, 0.4) !important;
        color: #ffffff !important;
    }

    .vcb-dropdown-trigger {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.2);
        color: #f0f0f0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    .vcb-dropdown-trigger:hover {
        border-color: #667eea;
        background: rgba(255, 255, 255, 0.12);
    }

    .vcb-dropdown-trigger:focus,
    .vcb-dropdown.open .vcb-dropdown-trigger {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
    }

    .vcb-dropdown-arrow {
        color: rgba(255, 255, 255, 0.5);
    }

    .vcb-dropdown-menu {
        background: #1f2937;
        border-color: rgba(255, 255, 255, 0.15);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }

    .vcb-dropdown-item {
        color: #d1d5db;
    }

    .vcb-dropdown-item:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .vcb-dropdown-item.vcb-dd-active,
    .vcb-dropdown-item.vcb-dd-current {
        background: rgba(102, 126, 234, 0.15);
        color: #8b9cf7;
    }

    .vcb-dd-now {
        background: #667eea;
    }

    .vcb-dropdown-menu::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
    }
}

/* Ad Overlay */
.vcb-ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    background: #000;
    display: none;
    align-items: center;
    justify-content: center;
}

.vcb-ad-overlay.vcb-ad-active {
    display: flex;
}

.vcb-ad-overlay video,
.vcb-ad-overlay img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 0;
}

.vcb-ad-click-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
}



.vcb-ad-display-text {
    position: absolute;
    bottom: 120px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 0.9rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    z-index: 2;
    padding: 0 1rem;
}

.vcb-ad-skip-container {
    position: absolute;
    bottom: 70px;
    right: 16px;
    z-index: 20;
}

.vcb-ad-skip-btn {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 18px;
    font-size: 0.875rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
    text-align: center;
}

.vcb-ad-skip-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vcb-ad-skip-btn:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Ad Progress Bar - YouTube/Hotstar Style */
.vcb-ad-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
    padding: 16px 16px 12px;
    display: none;
    z-index: 10;
}

.vcb-ad-active .vcb-ad-progress {
    display: block;
}

.vcb-ad-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.vcb-ad-progress-label {
    background: rgba(255, 204, 0, 0.95);
    color: #000;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vcb-ad-progress-time {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.vcb-ad-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.vcb-ad-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffcc00 0%, #ffd500 50%, #ffcc00 100%);
    border-radius: 2px;
    transition: width 0.2s ease-out;
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.6);
}


/* Download Button Section */
.vcb-download-section {
    margin-top: 1.25rem !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
}

.vcb-download-size {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    letter-spacing: 0.01em;
}

@media (prefers-color-scheme: dark) {
    .vcb-download-size {
        color: #94a3b8;
    }
}

.vcb-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35);
}

.vcb-download-btn:hover:not(.vcb-download-disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.45);
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    color: #ffffff !important;
    text-decoration: none !important;
}

.vcb-download-btn:active:not(.vcb-download-disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35);
}

/* Download Icon (CSS-only) */
.vcb-download-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    position: relative;
}

.vcb-download-icon::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 2px;
    height: 12px;
    background: #ffffff;
    border-radius: 1px;
}

.vcb-download-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 7px;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

/* Disabled state */
.vcb-download-btn.vcb-download-disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0.7;
}

.vcb-download-btn.vcb-download-disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.vcb-download-text {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .vcb-download-section {
        margin-top: 1rem;
    }

    .vcb-download-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
        width: auto;
        min-width: 200px;
    }
}

/* Dark mode download button */
@media (prefers-color-scheme: dark) {
    .vcb-download-btn {
        box-shadow: 0 4px 14px rgba(102, 126, 234, 0.5);
    }

    .vcb-download-btn:hover:not(.vcb-download-disabled) {
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    }

    .vcb-download-btn.vcb-download-disabled {
        background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
}