/* Custom styles for TCR Browser */

/* Base styles for consistent rendering across different DPI/scaling */
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    zoom: 1.0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tab Styles - Bigger and Clearer (No Border) */
.tab-button {
    border: none;
    color: #6b7280;
    transition: all 0.2s;
    font-weight: 600;
    letter-spacing: 0.025em;
    background-color: #e5e7eb; /* light gray for inactive tabs */
    border-radius: 0.375rem;
}

.tab-button:hover {
    color: #111827;
    background-color: #d1d5db;
}

.tab-button.active {
    color: #f9fafb;
    font-weight: 700;
    background-color: #00598a; /* deep sky blue to match header/footer */
    text-shadow: 0 0 0 currentColor;
}

.tab-button:focus {
    outline: none; /* remove focus border to avoid visible tab outline */
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Message Styles */
.message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.message-success {
    background-color: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.message-error {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.message-warning {
    background-color: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.message-info {
    background-color: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

/* Table Styles */
#igt-table {
    table-layout: fixed;
    width: 100%;
}

#igt-table tbody tr:hover {
    background-color: #f9fafb;
}

#igt-table tbody tr.selected {
    background-color: #eff6ff;
}

/* Ensure both tab panels have consistent card height
.tab-panel > .bg-white.rounded-lg.shadow {
    min-height: calc(100vh - 230px);
} */

/* Search Highlight */
mark {
    background-color: #fef08a;
    color: #1f2937;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

/* Search Clear Button */
#igt-search-clear {
    transition: color 0.2s;
}

#igt-search-clear:hover {
    color: #1f2937;
}

#igt-search-clear:active {
    transform: scale(0.95);
}

/* Scrollbar Styling */
#igt-table-container div[style*="overflow"]::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#igt-table-container div[style*="overflow"]::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

#igt-table-container div[style*="overflow"]::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

#igt-table-container div[style*="overflow"]::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Results Table */
.results-table {
    font-size: 0.875rem;
}

.results-table th {
    position: sticky;
    top: 0;
    background-color: #f9fafb;
    z-index: 10;
}

.results-table-container {
    max-height: 600px;
    overflow-y: auto;
}

/* Autocomplete Styles (for future enhancement) */
.autocomplete-items {
    position: absolute;
    border: 1px solid #d1d5db;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-items div {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}

.autocomplete-items div:hover {
    background-color: #f3f4f6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 0.5rem !important;
    }
}

/* Print styles */
@media print {
    header, footer, .tab-button, button {
        display: none;
    }
    
    .tab-panel {
        display: block !important;
    }
}

