/* Custom styles to complement Bootstrap dark theme */

.card {
    border-color: var(--bs-border-color-translucent);
}

.table-hover tbody tr:hover {
    background-color: var(--bs-secondary-bg);
}

.text-truncate {
    cursor: help;
}

.badge {
    font-size: 0.75em;
}

.navbar-brand {
    font-weight: 600;
}

.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

.btn-outline-secondary:hover {
    color: var(--bs-body-color);
}

.alert {
    border: none;
    border-radius: 0.5rem;
}

.card-header {
    background-color: var(--bs-secondary-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--bs-secondary);
    border-radius: 50%;
    border-top-color: var(--bs-primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* Search preview styling */
#search_preview {
    font-family: monospace;
    font-weight: 500;
}

/* Responsive table improvements */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        margin-bottom: 0.5rem;
    }
}

/* Footer styling */
footer {
    margin-top: auto;
}

footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Form validation */
.was-validated .form-control:valid {
    border-color: var(--bs-success);
}

.was-validated .form-control:invalid {
    border-color: var(--bs-danger);
}

/* Status indicators */
.status-operational {
    color: var(--bs-success);
}

.status-error {
    color: var(--bs-danger);
}

/* Search tips styling */
.list-unstyled li {
    padding: 0.25rem 0;
}

/* Export button styling */
.btn-group .btn {
    border-radius: 0.375rem;
}

.btn-group .btn:not(:last-child) {
    margin-right: 0.5rem;
}

/* Table improvements */
.table th {
    border-top: none;
    font-weight: 600;
    background-color: var(--bs-secondary-bg);
}

.table td {
    vertical-align: middle;
}

/* Badge improvements */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Icon improvements */
.fas, .far {
    width: 1.25em;
    text-align: center;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-secondary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-secondary-color);
}
