/* Custom Video Player Styles */
.video-js {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9;
    background-color: #000;
}

.video-js .vjs-tech {
    width: 100%;
    height: 100%;
}

.avp-video-player {
    max-width: 100%;
    margin: 0 auto;
    display: block;
}

/* Container wrapper */
.avp-video-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    background: #000;
}

/* Video title styling */
.avp-video-title {
    margin: 1rem 0;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Controls styling */
.video-js .vjs-control-bar {
    background-color: rgba(0, 0, 0, 0.7);
}

.vjs-poster img {
    object-fit: contain;
    background-color: #fff;
}

body.dark .vjs-poster img {
    object-fit: contain;
    background-color: #000000;
}   

/* YouTube-style caption menu */
.video-js .vjs-captions-button .vjs-menu-content,
.video-js .vjs-subs-caps-button .vjs-menu-content {
    background-color: rgba(28, 28, 28, 0.9) !important;
    border-radius: 2px !important;
    padding: 0 !important;
    width: auto;
    right: 0;
    max-height: none;
}

.video-js .vjs-captions-button .vjs-menu-item,
.video-js .vjs-subs-caps-button .vjs-menu-item {
    color: #fff !important;
    font-family: "YouTube Noto", Roboto, Arial, sans-serif !important;
    font-size: 13px !important;
    padding: 12px 20px !important;
    text-transform: none !important;
    min-width: 180px !important;
    border: none !important;
    justify-content: flex-start;
}

.video-js .vjs-captions-button .vjs-menu-item:hover,
.video-js .vjs-subs-caps-button .vjs-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    text-shadow: none !important;
}

.video-js .vjs-captions-button .vjs-menu-item.vjs-selected,
.video-js .vjs-subs-caps-button .vjs-menu-item.vjs-selected {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    text-shadow: none !important;
}

/* Caption settings button style */
.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before {
    font-family: "VideoJS" !important;
    font-size: 1.8em !important;
}

/* Add divider for captions settings */
.video-js .vjs-captions-button .vjs-menu-content::before,
.video-js .vjs-subs-caps-button .vjs-menu-content::before {
    content: "Captions Settings";
    display: block;
    padding: 12px 20px;
    color: #fff;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Style for "Captions off" option */
.video-js .vjs-captions-button .vjs-menu-item[aria-checked="false"],
.video-js .vjs-subs-caps-button .vjs-menu-item[aria-checked="false"] {
    font-style: italic;
    color: rgba(255, 255, 255, 0.7) !important;
}