/* Custom styles for Tool Overview site */

/* Enhanced table styling */
.table {
    margin-bottom: 0;
}

.table th.sort {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.table th.sort:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.table th.sort.sort-active {
    background-color: rgba(255, 255, 255, 0.2);
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.tool-row {
    cursor: pointer;
}

/* Search input enhancements */
.input-group:focus-within {
    border-radius: 0.375rem;
}

.input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

/* Badge styling */
.badge {
    font-size: 0.75em;
    font-weight: 500;
}

/* Card enhancements */
.card {
    border: 1px solid rgba(0, 0, 0, 0.125);
}

/* Button styling */
.btn {
    transition: background-color 0.2s ease;
}

/* Navigation enhancements */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

/* Tool detail page styling */
.display-5 {
    font-weight: 600;
    color: #212529;
}

.card-title {
    color: #495057;
    font-weight: 600;
}

/* Loading animation for external links */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive table improvements */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.375rem;
        font-size: 0.75rem;
    }
}

/* Custom scrollbar for webkit browsers */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

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

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

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

/* Footer styling */
footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* Search highlight effect */
.search:focus {
    border-color: #80bdff;
}

/* Tool count badge */
#tool-count {
    font-weight: 600;
    color: #0d6efd;
}

/* No results styling */
#no-results {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    border: 2px dashed #dee2e6;
}

/* Form control focus states */
.form-select:focus,
.form-control:focus {
    border-color: #80bdff;
}

/* Link styling in content */
.card-text a {
    color: #0d6efd;
    text-decoration: none;
}

.card-text a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* Code block styling */
pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1rem;
    overflow-x: auto;
}

code {
    background-color: #f8f9fa;
    color: #d63384;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

/* Tag styling in tool details */
.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* Description list styling */
.row dl dt {
    font-weight: 600;
    color: #495057;
}

.row dl dd {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

/* Multiselect dropdown styling */
.dropdown-menu {
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-item label {
    margin-bottom: 0;
    cursor: pointer;
    width: 100%;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item label:hover {
    background-color: transparent;
}

.clear-multiselect {
    color: #dc3545;
}

.clear-multiselect:hover {
    background-color: #f8f9fa;
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-hover {
    transition: background-color 0.15s ease-in-out;
}