/* Car Damage Assessment AI - Custom Styles */

body {
    background-color: #ffffff;
    font-family: 'Source Sans Pro', sans-serif;
    margin: 0;
    padding: 0;
}

.sidebar {
    background-color: #f0f2f6;
    min-height: 100vh;
    padding: 1rem;
    border-right: 1px solid #e6e9ef;
    width: 280px;
}

.main-content {
    padding: 2rem 3rem;
    background-color: #ffffff;
}

.streamlit-container {
    max-width: 1200px;
    margin: 0 auto;
}

.config-section {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h6 {
    font-size: 14px;
    font-weight: 600;
    color: #262730;
    margin-bottom: 0.5rem;
    text-transform: none;
}

.upload-area {
    border: 1px dashed #d0d3d9;
    border-radius: 4px;
    padding: 2rem;
    text-align: center;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.upload-area:hover {
    border-color: #ff4b4b;
    background-color: #fff;
}

.upload-area.dragover {
    border-color: #ff4b4b;
    background-color: #fff5f5;
}

.results-section {
    background: #fafafa;
    border-radius: 4px;
    padding: 1.5rem;
    border: 1px solid #e6e9ef;
    margin-top: 1rem;
}

.damage-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e6e9ef;
}

.damage-item:last-child {
    border-bottom: none;
}

.metric-card {
    background: white;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.metric-card .metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #262730;
    margin-bottom: 0.25rem;
}

.metric-card .metric-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

.image-comparison {
    background: white;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.image-container {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e6e9ef;
}

.image-container img {
    max-height: 300px;
    width: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.placeholder-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 4px;
    color: #6c757d;
    font-style: italic;
}

.confidence-slider {
    width: 100%;
    margin: 0.5rem 0;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #262730;
    margin-bottom: 1rem;
}

.app-title {
    color: #262730;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.app-subtitle {
    color: #808495;
    font-size: 16px;
    margin-bottom: 2rem;
    font-weight: 400;
}

.info-text {
    color: #808495;
    font-size: 12px;
}

.sample-analysis {
    background-color: #f0f8ff;
    border-left: 4px solid #0066cc;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 0 4px 4px 0;
}

.streamlit-expander {
    border: 1px solid #e6e9ef;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.streamlit-expander-header {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e6e9ef;
    cursor: pointer;
    font-weight: 600;
    color: #262730;
}

.streamlit-expander-content {
    padding: 1rem;
}

.stButton > button {
    background-color: #ff4b4b;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.stButton > button:hover {
    background-color: #e63946;
}

.metric-container {
    background: white;
    border: 1px solid #e6e9ef;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: #262730;
}

.metric-label {
    font-size: 14px;
    color: #808495;
    margin-bottom: 0.25rem;
}

/* Damage badges styling */
.damage-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.damage-badges .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

/* Assessment Summary Styles */
.assessment-summary h5 {
    color: #333;
    font-weight: 600;
}

/* Damage Detail Cards */
.damage-detail-card .card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.damage-detail-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0;
}

.damage-detail-card .btn-link {
    color: #333;
    padding: 1rem;
    font-weight: 500;
}

.damage-detail-card .btn-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
}

.damage-detail-card .severity-indicator {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.damage-detail-card .card-body {
    padding: 1.5rem;
}

.damage-detail-card .card-body p {
    margin-bottom: 0.75rem;
    color: #555;
}

.damage-detail-card .alert {
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Upload Section Styles */
.upload-preview-container {
    height: 100%;
    min-height: 300px;
}

.image-preview-wrapper {
    background: #f8f9fa;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    padding: 1rem;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.preview-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-area {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Chart Styles */
.damage-charts {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e6e9ef;
}

.chart-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #f0f2f6;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-container h6 {
    color: #262730;
    font-weight: 600;
    margin-bottom: 1rem;
}

.chart-container canvas {
    max-height: 300px;
    width: 100% !important;
    height: auto !important;
}

/* Processing Options Summary */
.processing-options-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.option-status {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 8px;
}

.option-status.enabled {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.option-status.disabled {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
}

/* Main Section Standardization */
.main-section {
    background: white;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.section-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px 25px;
    border-bottom: 1px solid #dee2e6;
}

.section-title {
    color: #495057;
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.section-content {
    padding: 25px;
}

/* Legacy Assessment Report Section - Remove specific styling */
.assessment-report {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
}

.report-container {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    border: 1px solid #dee2e6;
}

.report-header {
    background: white;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.report-header p {
    margin-bottom: 8px;
    font-size: 14px;
}

.report-header p:last-child {
    margin-bottom: 0;
}

.report-table-container {
    background: white;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.report-table-container table {
    margin-bottom: 0;
    font-size: 14px;
}

.report-table-container th {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Removed report-actions styling as button is now left-aligned and smaller */

/* Collapsible arrow animation */
.collapse-arrow {
    transition: transform 0.3s ease;
}

.collapsed .collapse-arrow {
    transform: rotate(0deg);
}

.btn:not(.collapsed) .collapse-arrow {
    transform: rotate(180deg);
}

/* Workshop Section Styles */
.map-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #e9ecef;
}

.workshop-list {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
    max-height: 300px;
    overflow-y: auto;
}

.workshop-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.workshop-item:hover {
    background: #e9ecef;
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.workshop-name {
    font-weight: 600;
    color: #262730;
    margin-bottom: 4px;
}

.workshop-address {
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 6px;
}

.workshop-distance {
    font-size: 0.8em;
    color: #007bff;
    font-weight: 500;
}

.workshop-rating {
    font-size: 0.8em;
    color: #ffc107;
    margin-left: 8px;
}

#workshopMap {
    border: 1px solid #dee2e6;
}

/* AI Suggestion Section Styles */
.ai-suggestion-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.ai-suggestion-section h3 {
    color: white;
    margin-bottom: 20px;
    font-weight: 600;
}

.ai-powered-badge {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 15px;
}

.ai-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.ai-info-block {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.ai-info-block h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.ai-info-block p {
    margin-bottom: 8px;
    opacity: 0.9;
}

.damage-analysis-table {
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.damage-analysis-table thead th {
    background: #2c3e50 !important;
    color: white;
    font-weight: 600;
    border: none;
    padding: 15px 10px;
    font-size: 0.9em;
}

.damage-analysis-table tbody tr {
    transition: background-color 0.3s ease;
}

.damage-analysis-table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.damage-analysis-table td {
    padding: 12px 10px;
    vertical-align: middle;
    border-color: rgba(0,0,0,0.1);
    color: #2c3e50;
}

.location-cell {
    font-weight: 500;
}

.description-cell {
    max-width: 200px;
    word-wrap: break-word;
}

.suggestion-cell {
    max-width: 250px;
    word-wrap: break-word;
    font-size: 0.9em;
}

.cost-cell {
    font-weight: bold;
    color: #27ae60;
}

/* Summary Section Styles */
.ai-summary-section {
    margin: 25px 0;
}

.summary-card {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
    margin-bottom: 15px;
}

.summary-card:hover {
    transform: translateY(-2px);
}

.summary-card h5 {
    margin-bottom: 10px;
    font-size: 1.5em;
}

.summary-value {
    font-size: 1.8em;
    font-weight: bold;
    color: white;
    display: block;
    margin-bottom: 5px;
}

.summary-label {
    font-size: 0.9em;
    opacity: 0.8;
    color: white;
}

/* Legacy styles for backward compatibility */
.ai-suggestion-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.vehicle-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.insurance-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.damage-suggestion-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    color: #2c3e50;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.damage-suggestion-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.damage-type-badge {
    background: #e74c3c;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 8px;
}

.damage-location {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.repair-suggestion {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.cost-range {
    background: #27ae60;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
}

.insurance-recommendation {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    border-left: 4px solid #f39c12;
    backdrop-filter: blur(10px);
}

.ai-badge {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 600;
    margin-left: 8px;
    display: inline-block;
}

/* Mobile Responsive Styles */
@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 999;
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        transition: transform 0.3s ease;
        min-height: 100vh;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: flex;
        position: fixed;
        top: 1rem;
        left: 1rem;
        right: auto;
        border-radius: 4px;
        z-index: 1001;
        transform: none;
        width: 40px;
        height: 40px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: #dc3545;
        border: none;
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .sidebar-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        background: white;
        margin: 2px 0;
        transition: 0.3s;
    }
    
    .sidebar-overlay {
        display: block;
    }
    
    .main-content {
        padding: 1rem;
        margin-left: 0;
    }
}