/* Language Selector Styles */
.language-selector {
    position: relative;
    display: inline-block;
    margin: 10px 0 20px 0;
    font-family: "Noto Sans", sans-serif;
}

.language-toggle-btn {
    background: #2d2d2d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
    justify-content: space-between;
    transition: background-color 0.2s;
}

.language-toggle-btn:hover {
    background: #404040;
}

.toggle-arrow {
    font-size: 12px;
    transition: transform 0.2s;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.language-dropdown.show {
    display: block;
}

.language-dropdown-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.language-dropdown-header h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.language-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: #0070f3;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.action-btn:hover {
    background: #0051cc;
}

.language-list {
    padding: 10px;
    max-height: 250px;
    overflow-y: auto;
}

.language-checkbox {
    margin-bottom: 8px;
}

.language-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.language-checkbox label:hover {
    background: #f5f5f5;
}

.language-checkbox input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.1);
}

.language-name {
    font-size: 14px;
    color: #333;
}

/* Responsive adjustments */
@media only screen and (max-width: 760px) {
    .language-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: 280px;
        max-width: 90vw;
        max-height: 70vh;
    }

    .language-selector {
        width: 100%;
        margin: 10px 0;
    }

    .language-toggle-btn {
        width: 100%;
        justify-content: space-between;
    }
}

/* Table column hiding animation */
table th,
table td {
    transition: all 0.3s ease;
}

/* Improved table styling for language columns */
table th[lang],
table td.text {
    min-width: 120px;
    vertical-align: top;
}

/* Compact view for many languages */
.compact-view table {
    font-size: 12px;
}

.compact-view .text {
    padding: 2px 4px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Print styles */
@media print {
    .language-selector {
        display: none;
    }
}
