/* Vocab Sidebar Widget */
.vocab_sidebar_widget {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 20vw;
    height: calc(100vh - 190px);
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
    font-size: 14px;
}

.vocab_sidebar_widget.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.vocab_sidebar_header {
    background-color: #000000;
    background-image: linear-gradient(180deg, #FBDF00 0%, #FBD100 100%);
    padding: 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vocab_sidebar_title {
    font-size: 18px;
    font-weight: bold;
    color: black;
}

.close_vocab_sidebar {
    font-size: 28px;
    font-weight: bold;
    color: black;
    cursor: pointer;
    line-height: 20px;
    transition: opacity 0.2s;
}

.close_vocab_sidebar:hover {
    opacity: 0.7;
}

.vocab_sidebar_body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 10px;
}

#vocab_sidebar_search_div {
    margin-bottom: 10px;
}

#vocab_sidebar_search_input {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

#vocab_sidebar_search_input:focus {
    outline: none;
    border-color: #FBDF00;
    box-shadow: 0 0 3px rgba(251, 223, 0, 0.5);
}

#vocab_sidebar_words_list {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.vocab_sidebar_word_row {
    padding: 8px 5px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vocab_sidebar_word_row:hover {
    background-color: #f9f9f9;
}

.vocab_sidebar_word_info {
    flex: 1;
    min-width: 0;
}

.vocab_sidebar_word_text {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.vocab_sidebar_word_text a {
    color: black;
    text-decoration: none;
}

.vocab_sidebar_word_text a:hover {
    text-decoration: underline;
}

.vocab_sidebar_word_class {
    margin: 2px 0 0 0;
    font-size: 11px;
    color: #888;
}

.vocab_sidebar_speaker_btn {
    cursor: pointer;
    font-size: 16px;
    margin-left: 8px;
    flex-shrink: 0;
    padding: 2px;
    transition: opacity 0.2s;
}

.vocab_sidebar_speaker_btn:hover {
    opacity: 0.7;
}

#vocab_sidebar_loading {
    text-align: center;
    color: #888;
    margin-top: 20px;
}

#vocab_sidebar_empty_msg {
    text-align: center;
    color: #888;
    margin-top: 20px;
    line-height: 1.5;
}

#vocab_sidebar_login_msg {
    text-align: center;
    color: #555;
    margin-top: 30px;
    line-height: 1.6;
    padding: 0 10px;
}

#vocab_sidebar_login_msg a {
    color: #000;
    font-weight: bold;
    text-decoration: underline;
}

#vocab_sidebar_upgrade_msg {
    text-align: center;
    color: #333;
    font-size: 14px;
    margin-top: 20px;
    padding: 12px 10px;
    line-height: 1.6;
    background-color: #FFF3E0;
    border-radius: 5px;
}

#vocab_sidebar_upgrade_msg a {
    color: #000;
    font-weight: bold;
    text-decoration: underline;
}

#vocab_sidebar_footer {
    padding-top: 8px;
    border-top: 1px solid #eee;
    text-align: center;
}

#vocab_sidebar_full_link {
    font-size: 13px;
    color: #555;
    text-decoration: none;
}

#vocab_sidebar_full_link:hover {
    text-decoration: underline;
    color: #000;
}

/* Floating vocab button */
#vocab_sidebar_button_div {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 5px;
    box-sizing: border-box;

    position: fixed;
    bottom: 20px;
    right: 158px;
    z-index: 1;

    /* Match the mentor button height: icon 24px + padding 10px top/bottom = 44px */
    min-height: 44px;

    background-color: #000000;
    background-image: linear-gradient(180deg, #FBDF00 0%, #FBD100 100%);

    cursor: pointer;
    box-shadow: 5px 5px 5px black;
}

#vocab_sidebar_button_div:hover {
    opacity: 0.7;
}

#vocab_sidebar_button_text {
    font-size: 14px;
    margin: 0;
}

.vocab-btn-emoji {
    font-size: 18px;
    vertical-align: middle;
    line-height: 1;
}

/* Tablet ------------------------------------------- */
@media screen and (max-width: 1300px) {
    .vocab_sidebar_widget {
        width: 35vw;
    }
}

/* Mobile ------------------------------------------- */
@media screen and (max-width: 900px) {
    .vocab_sidebar_widget {
        width: 90vw;
        height: 85vh;
        bottom: 50%;
        right: 50%;
        transform: translate(50%, 50%) translateY(20px);
    }

    .vocab_sidebar_widget.show {
        transform: translate(50%, 50%) translateY(0);
    }

    /* Stack vocab button on top of mentor button on mobile */
    #vocab_sidebar_button_div {
        right: 20px;
        bottom: 60px;
        padding: 8px;
        min-width: 75px;
        min-height: 36px;
    }

    #vocab_sidebar_button_text {
        font-size: 13px;
    }
}
