/* Biplot Visualization Styles */

/* Reputation Settings Panel */
.reputation-settings-panel {
    transition: all 0.3s ease;
}

.reputation-settings-panel .settings-select {
    cursor: pointer;
    transition: border-color 0.2s;
}

.reputation-settings-panel .settings-select:hover {
    border-color: var(--primary-blue, #3498db);
}

.reputation-settings-panel .settings-select:focus {
    outline: none;
    border-color: var(--primary-blue, #3498db);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.reputation-settings-panel input[type="range"] {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #dee2e6;
    border-radius: 3px;
    outline: none;
}

.reputation-settings-panel input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-blue, #3498db);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.reputation-settings-panel input[type="range"]::-webkit-slider-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.reputation-settings-panel input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--primary-blue, #3498db);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.reputation-settings-panel input[type="range"]::-moz-range-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.metric-selector {
    margin-bottom: 1rem;
}

.metric-select {
    cursor: pointer;
    background-color: white;
}

.metric-select:hover {
    border-color: var(--primary-blue, #3498db);
}

.biplot-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    min-height: 600px;
}

.biplot-viz {
    flex: 1 1 70%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    overflow: hidden;
}

.biplot-viz svg {
    max-width: 100%;
    height: auto;
}

.biplot-inspector {
    flex: 1 1 30%;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 600px;
}

/* Empty state for inspector */
.biplot-inspector:empty::before {
    content: 'Click on a paper to view details';
    display: block;
    color: #999;
    text-align: center;
    padding: 3rem 1rem;
    font-style: italic;
}

/* Inspector Content */
.inspector-content {
    animation: fadeIn 0.3s ease-in;
}

.inspector-streamlined {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.top-paper-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.inspector-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.inspector-title a {
    color: var(--primary-blue, #3498db);
    text-decoration: none;
}

.inspector-title a:hover {
    text-decoration: underline;
}

.inspector-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.inspector-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.inspector-meta-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.meta-separator {
    color: #ccc;
    margin: 0 0.25rem;
}

/* Metrics Grid */
.inspector-metrics {
    margin-bottom: 1.5rem;
}

.inspector-metrics h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 0.75rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.metric {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.metric-label {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue, #3498db);
    margin-top: 0.25rem;
}

/* Conclusion */
.inspector-conclusion {
    margin-bottom: 1.5rem;
}

.inspector-conclusion h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 0.75rem;
}

.inspector-conclusion p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #333;
    padding: 0.75rem;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.inspector-conclusion-compact {
    background: #fff9e6;
    border-left: 3px solid #ffc107;
    padding: 1rem;
    border-radius: 4px;
}

.inspector-conclusion-compact h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: #856404;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.inspector-conclusion-compact p {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #333;
    margin: 0;
}

/* Abstract */
.inspector-abstract {
    margin-bottom: 1.5rem;
}

.inspector-abstract h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 0.75rem;
}

.inspector-abstract p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #555;
}

/* Tags */
.inspector-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.inspector-tags-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag-theme {
    background: #e3f2fd;
    color: #1976d2;
}

.tag-country {
    background: #f3e5f5;
    color: #7b1fa2;
}

.tag-methodology {
    background: #e8f5e9;
    color: #388e3c;
}

/* Authors List */
.inspector-authors {
    margin-bottom: 1.5rem;
}

.inspector-authors h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 0.75rem;
}

.authors-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.author-item {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    border-left: 3px solid var(--primary-blue, #3498db);
}

.author-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
}

.author-affiliation {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.125rem;
}

.author-stat {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.125rem;
}

.authors-more {
    font-size: 0.75rem;
    color: #999;
    font-style: italic;
    padding: 0.5rem;
}

/* Actions */
.inspector-actions {
    margin-top: 1.5rem;
}

.inspector-actions .btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-compact {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary-blue, #3498db);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Tooltip */
.biplot-tooltip {
    position: absolute;
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.92);
    color: white;
    border-radius: 8px;
    pointer-events: none;
    z-index: 1000;
    max-width: 380px;
    min-width: 280px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.biplot-tooltip strong {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.3;
}

/* D3 Axis Styles */
.biplot-viz .x-axis path,
.biplot-viz .y-axis path,
.biplot-viz .x-axis line,
.biplot-viz .y-axis line {
    stroke: #666;
    stroke-width: 1px;
}

.biplot-viz .x-axis text,
.biplot-viz .y-axis text {
    fill: #333;
    font-size: 12px;
}

.biplot-viz .grid line {
    stroke: #ddd;
    stroke-dasharray: 2,2;
}

.biplot-viz .axis-label {
    fill: #333;
}

.biplot-viz .legend text {
    fill: #555;
}

/* Paper Circles */
.paper-circle {
    transition: opacity 0.2s, stroke-width 0.2s;
}

.paper-circle:hover {
    filter: drop-shadow(0 0 8px rgba(52, 152, 219, 0.6));
}

/* Legacy List View Fallback */
.legacy-papers-list {
    margin-top: 2rem;
}

.legacy-papers-list h3 {
    color: #333;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .biplot-container {
        flex-direction: column;
    }
    
    .biplot-viz,
    .biplot-inspector {
        flex: 1 1 100%;
    }
    
    .biplot-inspector {
        max-height: 500px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .biplot-container {
        gap: 1rem;
    }
    
    .biplot-viz,
    .biplot-inspector {
        padding: 1rem;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .metric {
        padding: 0.5rem;
    }
    
    .metric-value {
        font-size: 1.25rem;
    }
    
    .inspector-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .biplot-viz svg {
        min-height: 400px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

