/* Pension Funds Comparison System Styles */

/* Global Search Input */
#global-search {
    transition: all 0.2s ease;
}

#global-search:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#global-search::placeholder {
    color: #9ca3af;
}

/* Search Button */
#search-btn {
    transition: all 0.2s ease;
}

#search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

#search-btn:active {
    transform: translateY(0);
}

.fund-type-btn {
    transition: all 0.2s ease;
}

.fund-type-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.fund-type-btn.active {
    background: #3b82f6 !important;
    color: white !important;
}

.analysis-type-btn {
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.analysis-type-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.analysis-type-btn.active {
    background: #8b5cf6 !important;
    color: white !important;
}

#comparison-table {
    font-size: 0.875rem;
}

#comparison-table th {
    position: sticky;
    top: 0;
    background: #f3f4f6;
    z-index: 10;
}

#comparison-table td,
#comparison-table th {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

#comparison-table tr:hover {
    background: #f9fafb;
}

.return-positive {
    color: #16a34a;
    font-weight: 600;
}

.return-negative {
    color: #dc2626;
    font-weight: 600;
}

.return-neutral {
    color: #6b7280;
    font-weight: 600;
}

.risk-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.risk-low {
    background: #dcfce7;
    color: #166534;
}

.risk-medium {
    background: #fef3c7;
    color: #92400e;
}

.risk-high {
    background: #fee2e2;
    color: #991b1b;
}

.risk-very-high {
    background: #fce7f3;
    color: #9f1239;
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.recommendation-card {
    padding: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.recommendation-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.suitability-score {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(to right, #10b981, #059669);
    color: white;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.prediction-card {
    padding: 1.5rem;
    background: linear-gradient(to right, #f0f9ff, #e0f2fe);
    border-right: 4px solid #3b82f6;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.prediction-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e40af;
}

.confidence-bar {
    height: 0.5rem;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(to right, #3b82f6, #6366f1);
    transition: width 0.5s ease;
}

.pattern-item {
    padding: 0.75rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.risk-indicator {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    margin-left: 0.5rem;
}

.risk-indicator.low {
    background: #16a34a;
}

.risk-indicator.medium {
    background: #eab308;
}

.risk-indicator.high {
    background: #dc2626;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #comparison-table {
        font-size: 0.75rem;
    }

    #comparison-table td,
    #comparison-table th {
        padding: 0.5rem;
    }

    .fund-type-btn,
    .analysis-type-btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

/* Chart container */
.chart-container {
    position: relative;
    height: 400px;
    margin: 1rem 0;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-state i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

/* Error state */
.error-state {
    padding: 1.5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    color: #991b1b;
    margin: 1rem 0;
}

/* Success state */
.success-state {
    padding: 1.5rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
    color: #166534;
    margin: 1rem 0;
}
