/**
 * Imployii Translation Styles
 * Styling for translation-related UI components
 */

/* Language Selector Dropdown */
.language-switch-container {
    position: relative;
    margin-left: 20px;
}

.language-button {
    display: flex;
    align-items: center;
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    color: #333333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.language-button i.fas.fa-globe {
    margin-right: 8px;
    color: #FF5400;
}

/* RTL support for globe icon */
[dir="rtl"] .language-button i.fas.fa-globe {
    margin-right: 0;
    margin-left: 8px;
}

.language-button:hover {
    background-color: #f5f5f5;
}

.language-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 84, 0, 0.3);
}

.dropdown-icon {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.language-button[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
}

.language-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    max-height: 500px;
    overflow-y: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    padding: 12px 0;
}

.language-dropdown-menu[aria-hidden="false"] {
    display: block;
}

.language-search-container {
    padding: 0 16px 12px;
    border-bottom: 1px solid #eee;
    margin-bottom: 12px;
}

.language-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.language-search:focus {
    outline: none;
    border-color: #FF5400;
    box-shadow: 0 0 0 2px rgba(255, 84, 0, 0.2);
}

.language-group {
    margin-bottom: 16px;
}

.language-group-title {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    margin: 0 16px 8px;
}

.language-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.language-list li {
    padding: 0;
    margin: 0;
}

.language-list a {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.language-list a:hover {
    background-color: #f5f5f5;
}

.language-list a.active {
    background-color: #f0f8ff;
    color: #FF5400;
    font-weight: 500;
}

/* RTL support for languages like Arabic and Hebrew */
[dir="rtl"] .language-button .dropdown-icon {
    margin-left: 0;
    margin-right: 8px;
}

[dir="rtl"] .language-dropdown-menu {
    left: 0;
    right: auto;
}

/* Translation Preferences Page */
.translation-preferences {
    max-width: 800px;
    margin: 0 auto;
}

.translation-preferences .card {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.translation-preferences .card-header {
    background-color: #001849;
    color: white;
    border-bottom: none;
    padding: 16px 20px;
}

.translation-preferences .card-body {
    padding: 24px;
}

.translation-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.translation-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.translation-section h5 {
    color: #001849;
    font-weight: 600;
    margin-bottom: 12px;
}

.translation-option {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.translation-option:hover {
    background-color: #f9f9f9;
}

.translation-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.translation-option .form-check-input {
    margin-right: 12px;
}

.translation-option .form-check-input:checked {
    background-color: #FF5400;
    border-color: #FF5400;
}

.translation-option small {
    display: block;
    margin-left: 32px;
    color: #777;
}

/* Translation in progress indicator */
.translating-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: #777;
    margin-left: 8px;
}

.translating-indicator .spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 84, 0, 0.3);
    border-top-color: #FF5400;
    border-radius: 50%;
    margin-right: 6px;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}