/**
 * Stock Analyst Ratings - Public Styles
 */

/* Dashboard Container */
.sar-dashboard-public {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Summary Stats */
.sar-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.sar-stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sar-stat-box h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sar-stat-value {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
}

/* Dashboard Sections */
.sar-dashboard-section {
    margin-bottom: 50px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sar-dashboard-section h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
}

.sar-rec-description {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
}

/* Recommendation-specific styling */
.sar-recommendations-buy {
    border-left: 4px solid #10b981;
}

.sar-recommendations-sell {
    border-left: 4px solid #ef4444;
}

/* Tables */
.sar-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.sar-table thead {
    background: #f8f9fa;
}

.sar-table th {
    padding: 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
}

.sar-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

.sar-table tbody tr:hover {
    background-color: #f9fafb;
}

.sar-row-bullish {
    background-color: rgba(16, 185, 129, 0.03);
}

.sar-row-bearish {
    background-color: rgba(239, 68, 68, 0.03);
}

/* Consensus Score Colors */
.sar-consensus-green {
    color: #059669;
    font-weight: 600;
}

.sar-consensus-light-green {
    color: #10b981;
    font-weight: 600;
}

.sar-consensus-yellow {
    color: #f59e0b;
    font-weight: 600;
}

.sar-consensus-orange {
    color: #f97316;
    font-weight: 600;
}

.sar-consensus-red {
    color: #dc2626;
    font-weight: 600;
}

.sar-consensus-gray {
    color: #9ca3af;
    font-weight: 600;
}

/* Badges */
.sar-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sar-badge-buy {
    background-color: #d1fae5;
    color: #065f46;
}

.sar-badge-sell {
    background-color: #fee2e2;
    color: #991b1b;
}

.sar-badge-green {
    background-color: #d1fae5;
    color: #065f46;
}

.sar-badge-light-green {
    background-color: #d1fae5;
    color: #047857;
}

.sar-badge-yellow {
    background-color: #fef3c7;
    color: #92400e;
}

.sar-badge-orange {
    background-color: #fed7aa;
    color: #9a3412;
}

.sar-badge-red {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Ratings Breakdown */
.sar-ratings-breakdown {
    font-size: 12px;
    color: #6b7280;
    font-family: "Courier New", monospace;
}

/* Empty States */
.sar-empty {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-style: italic;
}

.sar-error {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sar-dashboard-public {
        padding: 10px;
    }
    
    .sar-summary {
        grid-template-columns: 1fr;
    }
    
    .sar-stat-box {
        padding: 20px;
    }
    
    .sar-stat-box h4 {
        font-size: 12px;
    }
    
    .sar-stat-value {
        font-size: 28px;
    }
    
    .sar-dashboard-section {
        padding: 15px 12px;
        margin-bottom: 20px;
    }
    
    .sar-dashboard-section h3 {
        font-size: 20px;
    }
    
    .sar-rec-description {
        font-size: 13px;
    }
    
    /* Make table scrollable on mobile */
    .sar-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .sar-table {
        font-size: 11px;
        min-width: 600px; /* Forces horizontal scroll */
    }
    
    .sar-table th,
    .sar-table td {
        padding: 8px 4px;
        white-space: nowrap;
    }
    
    .sar-table td:first-child,
    .sar-table th:first-child {
        position: sticky;
        left: 0;
        background: white;
        z-index: 1;
    }
    
    .sar-ratings-breakdown {
        font-size: 9px;
    }
    
    .sar-badge {
        padding: 4px 8px;
        font-size: 10px;
    }
}
