/* Removemos o posicionamento do item principal */
.interactive-item {
    position: static; /* Garante que não seja a âncora */
}

/* A caixa de mensagem ("Você errou!") se torna a âncora */
.interactive-item .overlay-message {
    position: relative;
    padding-right: 50px;
    display: flex;
    align-items: center;
}

/* Posiciona o ícone dentro da caixa de mensagem */
.ai-corrector-wrapper {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    z-index: 10;
}

.ai-corrector-button {
    background-color: transparent; 
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    width: 28px;
    height: 28px;
    cursor: pointer;
    opacity: 0.65;
    transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

.ai-corrector-button img {
    width: 100%;
    height: 100%;
}

.ai-corrector-button:hover {
    opacity: 1;
    transform: scale(1.15);
    background-color: transparent;
}

/* Estilo para a MENSAGEM TEMPORÁRIA */
.ai-temp-message {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
}

/* Estilos do modal */
#ai-corrector-modal {
    position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%;
    overflow: auto; background-color: rgba(0, 0, 0, 0.6); display: none;
    align-items: center; justify-content: center;
}
.ai-corrector-modal-content {
    background-color: #fefefe; margin: auto; padding: 30px; border: 1px solid #888;
    width: 80%; max-width: 700px; border-radius: 8px; position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); line-height: 1.7;
}
.ai-corrector-close-button {
    color: #aaa; position: absolute; top: 10px; right: 20px;
    font-size: 28px; font-weight: bold; cursor: pointer;
}
.ai-corrector-close-button:hover { color: black; }
#ai-corrector-response-area h3 {
    color: #0056b3; margin-top: 1.5em; padding-bottom: 5px; border-bottom: 1px solid #eee;
}
#ai-corrector-response-area strong {
    font-weight: bold;
    color: #0056b3;
}
.ai-corrector-loader, .ai-corrector-error {
    text-align: center; font-style: italic; padding: 20px 0;
}
.ai-corrector-error strong { color: #d9534f; }