/* ===== РАЗДЕЛ ПЕРЕВОДОВ ===== */

.translations-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===== ФИЛЬТРЫ ===== */

.filter-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.filter-section h3 {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.filter-group input,
.filter-group select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: var(--text-primary);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px #dbeafe;
}

/* Кнопки для фильтра языков */
.language-buttons-group {
    display: flex;
    gap: 8px;
}

.btn-filter {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid var(--border);
    background: white;
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-filter:hover {
    border-color: var(--primary);
    background: #f0f9ff;
}

.btn-filter.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== МАССОВЫЕ ДЕЙСТВИЯ ===== */

.mass-actions {
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.mass-actions-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.selected-counter {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.mass-actions-right {
    display: flex;
    gap: 12px;
}

.mass-actions-right .btn {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
}

/* ===== СТАТУС ПЕРЕВОДОВ ===== */

.translation-status-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.3s ease;
}

.translation-status-section.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.translation-status-section h3 {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.status-languages-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 6px;
}

.status-language-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.status-language-item:hover {
    background: rgba(52, 152, 219, 0.1);
}

.status-language-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.status-lang-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

#start-translation-btn {
    margin-bottom: 16px;
}

/* Прогресс перевода */
.translation-progress {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 6px;
}

.translation-progress.hidden {
    display: none;
}

.progress-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-item-lang {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
}

.progress-item-percent {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #2563eb);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ===== ЯЗЫКОВЫЕ БЕЙДЖИ ===== */

.language-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #dbeafe;
    color: var(--primary);
    margin-right: 4px;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.translation-languages-badges {
    margin: 12px 0;
}

.language-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== СЕТКА КАРТОЧЕК ПЕРЕВОДОВ ===== */

.translation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.translation-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    position: relative;
}

.translation-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.translation-card.selected {
    border-color: var(--success);
    background: #f0fdf4;
}

/* Чекбокс */
.translation-checkbox {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Заголовок карточки */
.translation-card-header {
    padding-left: 32px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.translation-card-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 4px;
}

.translation-card-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.translation-card-body {
    padding: 12px 0;
}

.translation-card-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.translation-card-text {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Языки */
.translation-languages {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.language-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.language-block:hover {
    background: #f0f9ff;
    border-color: var(--primary);
}

.language-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.language-status {
    font-size: 12px;
    min-height: 20px;
    display: flex;
    align-items: center;
}

.language-textarea {
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    min-height: 80px;
    resize: vertical;
    background: white;
    color: var(--text-primary);
}

.language-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px #dbeafe;
}

/* Статус */
.translation-status {
    display: flex;
    gap: 4px;
    margin-top: 12px;
    font-size: 12px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.translated {
    background: #dcfce7;
    color: var(--success);
}

.status-badge.not-translated {
    background: #fef3c7;
    color: #d97706;
}

/* Дата создания */
.translation-date {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ===== МОДАЛЬНОЕ ОКНО ПЕРЕВОДОВ ===== */

.modal-translation {
    max-width: 600px;
}

.translation-modal-info {
    background: #f0f9ff;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
}

.translation-modal-info p {
    margin: 0;
    font-size: 14px;
    color: var(--text-primary);
}

.translation-modal-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.translation-modal-section h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.translation-modal-section:last-of-type {
    border-bottom: none;
}

/* Сетка языков */
.translation-languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.translation-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.translation-lang-option:hover {
    border-color: var(--primary);
    background: #f0f9ff;
}

.translation-lang-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.translation-lang-option input[type="checkbox"]:checked ~ .lang-option-label {
    color: var(--primary);
    font-weight: 600;
}

.lang-option-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}

.lang-code {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 12px;
}

.lang-name {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Опции */
.translation-option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
    font-size: 14px;
}

.translation-option-item:hover {
    background: #f8f9fa;
}

.translation-option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Прогресс в модальном окне */
.translation-progress-modal {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.translation-progress-modal.hidden {
    display: none;
}

.translation-progress-modal h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.translation-progress-modal .progress-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.translation-progress-modal .progress-item {
    background: white;
    padding: 10px;
    border-radius: 4px;
}

.translation-progress-modal .progress-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
}

.translation-progress-modal .progress-item-lang {
    font-weight: 600;
    color: var(--text-primary);
}

.translation-progress-modal .progress-bar-container {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.translation-progress-modal .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #2563eb);
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* Прелоадер элемента */
.translation-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.translation-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1024px) {
    .translation-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .translation-languages {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .mass-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .mass-actions-right {
        width: 100%;
    }

    .mass-actions-right .btn {
        flex: 1;
    }

    .translation-grid {
        grid-template-columns: 1fr;
    }

    .translation-card {
        padding: 12px;
    }
}