﻿.translation-toolbar {
    padding: 1.25rem 0 0;
}

.translation-toolbar__inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    min-height: 3rem;
}

.translation-toolbar__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    border: 1px solid rgba(63, 45, 131, 0.2);
    border-radius: 999px;
    background: #ffffff;
    color: #302261;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(42, 28, 94, 0.08);
    cursor: pointer;
}

.translation-toolbar__button:hover,
.translation-toolbar__button:focus-visible {
    border-color: rgba(63, 45, 131, 0.42);
    color: #24184f;
    box-shadow: 0 10px 26px rgba(42, 28, 94, 0.13);
}

.translation-toolbar__button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.translation-toolbar__icon {
    font-size: 1.05rem;
    line-height: 1;
}

.translation-toolbar__spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: translation-spin 0.75s linear infinite;
}

.translation-toolbar__feedback {
    max-width: 720px;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(63, 45, 131, 0.14);
    border-radius: 14px;
    background: rgba(249, 247, 255, 0.92);
}

.translation-toolbar__message {
    margin: 0;
    color: #4a4162;
    font-size: 0.93rem;
    line-height: 1.45;
}

.translation-toolbar__message--error {
    color: #8b2530;
}

.translation-toolbar__switches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.45rem;
}

.translation-toolbar__link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #493495;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.18em;
    cursor: pointer;
}

.translation-toolbar__link:hover,
.translation-toolbar__link:focus-visible {
    color: #281b61;
}

@keyframes translation-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 767.98px) {
    .translation-toolbar {
        padding-top: 1rem;
    }

    .translation-toolbar__inner {
        align-items: stretch;
        flex-direction: column;
    }

    .translation-toolbar__button {
        width: 100%;
    }

    .translation-toolbar__feedback {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .translation-toolbar__spinner {
        animation-duration: 1.5s;
    }
}
