/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

/* Navbar */
.navbar-brand {
    font-size: 1.25rem;
    font-weight: 500;
}

/* Table Styles */
#dataTable {
    font-size: 0.875rem;
    table-layout: fixed;
}

#dataTable thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
    border-bottom: 2px solid #dee2e6;
    position: relative;
    user-select: none;
}

/* Column Resizer */
#dataTable thead th .resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 1;
}

#dataTable thead th .resizer:hover {
    background-color: #0d6efd;
}

#dataTable thead th .resizer.resizing {
    background-color: #0d6efd;
}

#dataTable thead th .th-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}

#dataTable thead th .th-actions {
    display: flex;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.2s;
}

#dataTable thead th:hover .th-actions {
    opacity: 1;
}

#dataTable tbody tr:hover {
    background-color: #f8f9fa;
}

#dataTable td {
    vertical-align: middle;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
}

#dataTable td:hover {
    background-color: #e9ecef;
}

#dataTable td.editing {
    padding: 0;
}

#dataTable td input {
    width: 100%;
    border: 2px solid #0d6efd;
    padding: 0.375rem 0.5rem;
    outline: none;
}

/* Cell Status Indicators */
.cell-empty {
    background-color: #fff3cd;
}

.cell-translated {
    background-color: #d1e7dd;
}

.cell-key {
    font-family: 'Courier New', monospace;
    font-weight: 500;
    color: #0d6efd;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

#loadingText {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Target Language Checkboxes */
#targetLanguages .form-check {
    display: inline-block;
}

#targetLanguages .form-check-input {
    cursor: pointer;
}

#targetLanguages .form-check-label {
    cursor: pointer;
    font-size: 0.875rem;
}

/* Statistics */
#langStats > div {
    padding: 0 1rem;
    border-left: 1px solid #dee2e6;
}

#langStats > div:first-child {
    border-left: none;
}

/* Toast Notifications */
.toast {
    min-width: 250px;
}

.toast-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.toast-error {
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.toast-info {
    background-color: #cff4fc;
    border-color: #b6effb;
}

.toast-warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
}

/* Buttons */
.btn-sm {
    font-size: 0.875rem;
}

/* Modal */
.modal-body ol, .modal-body ul {
    margin-bottom: 0;
}

.modal-body code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.875rem;
}

/* Scrollbar Styling */
.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    #dataTable {
        font-size: 0.75rem;
    }

    #dataTable td {
        max-width: 150px;
    }

    .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Delete Button in Row */
.delete-btn {
    opacity: 0;
    transition: opacity 0.2s;
}

tr:hover .delete-btn {
    opacity: 1;
}

/* Progress Bar for Translation */
.translation-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #0d6efd;
    z-index: 10000;
    transform-origin: left;
}
