/* Subtitle button styles - Updated for better mobile compatibility */
.mejs-subtitle-button {
    position: relative !important; /* Changed from relative to absolute for better control */
    float: right !important; /* Force float */
    margin-right: 45px !important;
    bottom: 10px !important; /* Consistent bottom positioning */
    top: 10px;
    cursor: pointer;
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    opacity: 1 !important;
    background: transparent;
}

.mejs-subtitle-button svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
}

/* Active state with underline */
.mejs-subtitle-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #87CEEB;
}

/* Update the language menu positioning */
.subtitle-language-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);  /* Position above the icon with a small gap */
    right: 0;  /* Align to the right of the subtitle button */
    background: rgba(0,0,0,0.5);
    border-radius: 4px;
    padding: 8px 0;
    min-width: 120px;
    z-index: 1000;
    transform: translateX(-50%);  /* Center the menu relative to the button */
}

.subtitle-language-menu.active {
    display: block;
}

.subtitle-toggle,
.subtitle-language {
    color: #fff;
    padding: 4px 12px;
    cursor: pointer;
    white-space: nowrap;
}

.subtitle-toggle:hover,
.subtitle-language:hover {
    background-color: rgba(255,255,255,0.1);
}

.subtitle-language.active {
    color: white;
}

/* Separator between toggle and languages */
.subtitle-toggle {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 4px;
    padding-bottom: 8px;
}

video::cue {
    line-height: 1.0 !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
}