.word-popover {
    position: absolute;
    width: auto;
    max-width: 300px;
    min-width: 200px;
    z-index: 10000;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
    background-color: #f8f8f8;
    /* Soft light gray background */
    border: 1px solid #ccc;
    /* Slightly darker border for subtle definition */
    padding: 10px;
    border-radius: 8px;
    display: none;
    animation: fadeIn 0.2s ease-out;
}

.word-popover::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #f8f8f8 transparent transparent transparent;
    /* Triangle using the same background color */
    transform: translateX(-50%);
}

.btn-delete-word-popover {
    position: absolute;
    top: -2px;
    right: -2px;
    color: #333;
    background-color: transparent;
    border: none;
    cursor: pointer;
    opacity: 0;
}

.word-popover:hover .btn-delete-word-popover {
    opacity: 1;
    /* Button becomes visible when popover is hovered */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#translationContent,
#pronouncementContent {
    max-width: 100%;
    /* Restrict maximum width to prevent overflow */
    word-wrap: break-word;
    /* Allow words to break and wrap onto the next line */
    overflow-wrap: break-word;
    /* Ensure overflow text is broken into lines */
    hyphens: auto;
    /* Automatic hyphenation */
}

#customTranslationInput {
    margin-right: 10px;
    flex-grow: 1;
    padding: 5px 10px;
    border-radius: 5px;
    resize: none;
    /* Disable manual resizing */
    overflow-y: auto;
    /* Allow scrolling inside the textarea */
    min-height: 34px;
    /* Minimum height similar to a regular input */
    line-height: 1;
    /* Adequate line spacing for readability */
}

#customTranslationInput:focus {
    outline: none;
}


.translation-loading-indicator {
    width: 100%;
    /* Full width of the container */
    height: 4px;
    /* Thin line */
    background-color: #f0f0f0;
    /* Background of the line */
    position: relative;
    overflow: hidden;
    /* Ensures the moving part doesn't go outside the bounds */
}

.translation-loading-indicator::before {
    content: "";
    position: absolute;
    height: 4px;
    /* Height of the moving line */
    width: 25%;
    /* Width of the moving part */
    background-color: #9CCB39;
    /* Color of the moving part */
    animation: marquee 2s linear infinite;
}

@keyframes marquee {
    0% {
        left: -25%;
    }

    /* Start from the left outside of the visible area */
    50% {
        left: 100%;
    }

    /* Move through to the right outside of the visible area */
    100% {
        left: -25%;
    }

    /* Return to start position */
}

.added-success {
    animation: pulseAnimation 0.5s ease-out;
    /* background-color: #9CCB39; */
    /* Green background to signify success */
    color: white;
    /* White text for contrast */
}

.added-error {
    animation: pulseAnimation 0.5s ease-out;
    color: white;
}

@keyframes pulseAnimation {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}