/* Report Page Specific Styles */

/* Loading States */
#loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Dynamic Content States */
.content-loading {
    opacity: 0.6;
    pointer-events: none;
}

.content-loaded {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* Safety Tech Badges */
.tech-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 8px;
}

.tech-badge.standard {
    background-color: #d1fae5;
    color: #065f46;
}

.tech-badge.optional {
    background-color: #fef3c7;
    color: #92400e;
}

.tech-badge.non-standard {
    background-color: #fef3c7;
    color: #92400e;
}

.tech-badge.not-available {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Star Rating Display */
.stars {
    display: inline-block;
    font-size: 1rem;
    color: #fbbf24;
    margin-right: 4px;
}

.stars::before {
    content: "★★★★★";
}

.stars[data-score="1"]::before {
    content: "★☆☆☆☆";
}

.stars[data-score="2"]::before {
    content: "★★☆☆☆";
}

.stars[data-score="3"]::before {
    content: "★★★☆☆";
}

.stars[data-score="4"]::before {
    content: "★★★★☆";
}

.stars[data-score="5"]::before {
    content: "★★★★★";
}

/* Recall Cards */
.recall-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recall-badge {
    background-color: #dc2626;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.recall-date {
    color: #6b7280;
    font-size: 0.875rem;
    margin-left: 12px;
}

.recall-component {
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 12px 0;
}

.recall-subheading {
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
    margin: 16px 0 8px 0;
}

.recall-text, .recall-consequence, .recall-remedy {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 12px;
}

.recall-consequence {
    background-color: #fef2f2;
    border-left: 4px solid #dc2626;
    padding: 12px;
    border-radius: 4px;
}

.recall-remedy {
    background-color: #fff5f5;
    border-left: 4px solid #C8102E;
    padding: 12px;
    border-radius: 4px;
}

/* Complaint Cards */
.complaint-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.complaint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.complaint-id {
    background-color: #C8102E;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.complaint-filed-date {
    color: #6b7280;
    font-size: 0.875rem;
}

.complaint-component {
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 12px 0;
}

.complaint-subheading {
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
    margin: 16px 0 8px 0;
}

.complaint-text {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* AI Summary Statistics */
.ai-summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    border-radius: 8px;
    background-color: #f9fafb;
    text-align: center;
}

.ai-summary-stat-number {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.ai-summary-stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.ai-summary-stat-positive .ai-summary-stat-number {
    color: #059669;
}

.ai-summary-stat-danger .ai-summary-stat-number {
    color: #dc2626;
}

.ai-summary-stat-warning .ai-summary-stat-number {
    color: #d97706;
}

.ai-summary-stat-neutral .ai-summary-stat-number {
    color: #4b5563;
}

/* Safety Info Cards */
.safety-info-cards {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.safety-info-cards:empty,
.safety-info-cards:not(:has(.safety-info-card:not([style*="display: none"]))) {
    display: none;
}

.safety-info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    border-radius: 8px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    text-align: center;
    flex: 1;
}

.info-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.info-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.safety-info-card.complaints {
    background-color: #fff7ed;
    border-color: #fdba74;
}
.safety-info-card.complaints .info-number {
    color: #f59e0b;
}

.safety-info-card.recalls {
    background-color: #fef2f2;
    border-color: #fca5a5;
}
.safety-info-card.recalls .info-number {
    color: #dc2626;
}

.safety-info-card.investigations {
    background-color: #f0f4f8;
    border-color: #cbd5e0;
}
.safety-info-card.investigations .info-number {
    color: #1e3a5f;
}

/* Crash Media Grid */
.crash-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.crash-media-item {
    text-align: center;
}

.crash-media-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.crash-media-caption {
    font-size: 0.875rem;
    color: #4b5563;
    margin-top: 8px;
}

.crash-media-caption small {
    color: #6b7280;
}

.crash-media-caption a {
    color: #C8102E;
    text-decoration: none;
}

.crash-media-caption a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .recall-header, .complaint-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .crash-media-grid {
        grid-template-columns: 1fr;
    }
    
    .ai-summary-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .safety-info-cards {
        flex-direction: column;
        gap: 12px;
    }
}

/* Fade-in animation for dynamically loaded content */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.empty-state-subtext {
    font-size: 0.875rem;
    color: #9ca3af;
}

.paging-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 0 0;
}

.paging-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.paging-btn.active, .paging-btn:hover {
    background: #C8102E;
    color: #fff;
    border-color: #C8102E;
}

.recall-note {
    margin-top: 32px;
}

.complaint-note {
    margin-top: 32px;
}

/* Copy Link Share Button */
.report-share-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.share-buttons-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    color: white;
}

.share-btn svg {
    flex-shrink: 0;
}

.share-btn-copy {
    background-color: #6b7280;
}

.share-btn-copy:hover {
    background-color: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
}

.share-btn-copy.copied {
    background-color: #22c55e;
}

.share-btn-copy.copied:hover {
    background-color: #16a34a;
}

@media (max-width: 768px) {
    .report-share-section {
        padding: 1rem;
    }
    
    .share-buttons-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        width: 100%;
    }
    
    .share-label {
        width: 100%;
        font-size: 0.875rem;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 0.875rem;
        font-size: 0.875rem;
    }
    
    .share-btn span {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .report-share-section {
        padding: 0.875rem;
    }
    
    .share-buttons-container {
        gap: 0.625rem;
    }
    
    .share-label {
        font-size: 0.8125rem;
        margin-bottom: 0.25rem;
    }
    
    .share-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .share-btn span {
        font-size: 0.8125rem;
    }
}

/* History Quick Access Card */
.history-quick-access {
    margin-top: 2rem;
    background: linear-gradient(135deg, #1e3a5f 0%, #C8102E 100%);
    border-radius: 16px;
    padding: 2rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.history-quick-access-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.history-quick-access-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    flex-shrink: 0;
}

.history-quick-access-icon svg {
    stroke: #fff;
}

.history-quick-access-text {
    flex: 1;
}

.history-quick-access-text h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.history-quick-access-text p {
    font-size: 0.9375rem;
    opacity: 0.9;
    margin: 0;
}

.history-quick-access-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #fff;
    color: #C8102E;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.history-quick-access-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    color: #C8102E;
}

@media (max-width: 768px) {
    .history-quick-access {
        padding: 1.5rem;
    }
    
    .history-quick-access-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .history-quick-access-text h3 {
        font-size: 1.125rem;
    }
    
    .history-quick-access-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .history-quick-access {
        padding: 1.25rem;
        border-radius: 12px;
    }
    
    .history-quick-access-icon {
        width: 48px;
        height: 48px;
    }
    
    .history-quick-access-text h3 {
        font-size: 1rem;
    }
    
    .history-quick-access-text p {
        font-size: 0.875rem;
    }
    
    .history-quick-access-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
} 