.aidana-tts-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-width: 0;
    margin-top: 3px;
    box-sizing: border-box;
}

.aidana-tts-actions .message-time,
.aidana-tts-actions .timestamp {
    margin-left: auto;
    /* В chat_ui* время выравнивается по краю пузыря (align-self в колонке).
       Здесь строка горизонтальная, поэтому то же свойство означает вертикаль —
       возвращаем центрирование относительно кнопки озвучки. */
    align-self: center;
}

.aidana-tts-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    align-self: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(71, 85, 105, .28);
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

/* Иконка декоративна: доступное имя даёт aria-label кнопки. currentColor
   подхватывает цвет пузыря сообщения в каждом из интерфейсов. */
.aidana-tts-button svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: currentColor;
    pointer-events: none;
}

.aidana-tts-button:hover {
    background: rgba(15, 118, 110, .10);
}

.aidana-tts-button:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

.aidana-tts-button[aria-pressed="true"] {
    border-color: #0f766e;
    background: rgba(15, 118, 110, .14);
}

/* Кнопка не блокируется во время генерации: пока идёт синтез, это
   единственный способ остановить озвучку. */
.aidana-tts-button .aidana-tts-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: aidana-tts-spin .8s linear infinite;
}

@keyframes aidana-tts-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .aidana-tts-button .aidana-tts-spinner { animation: none; }
}
