/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Header styles */
header {
    background-color: #673ab7;
    color: white;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.back-button {
    color: white;
    text-decoration: none;
    margin-right: 1rem;
    font-size: 1.2rem;
}

h1 {
    flex-grow: 1;
    font-size: 1.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.event-selector {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    min-width: 200px;
}

.event-selector option {
    background-color: #673ab7;
    color: white;
}

.download-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-btn i {
    font-size: 1rem;
}

/* Loading indicator */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    display: none;
}

.loading-container.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #673ab7;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Event selection */
.event-selection {
    display: none;
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.event-selection.active {
    display: block;
}

.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.event-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid #eee;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.event-card h3 {
    color: #673ab7;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.event-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.event-card .event-date {
    color: #999;
    font-size: 0.8rem;
}

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Tab content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

section {
    margin-bottom: 2rem;
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    page-break-inside: avoid;
    break-inside: avoid;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

h3 {
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 0.3rem;
}

/* Driver info section */
.driver-info {
    display: grid;
    gap: 1rem;
}

.info-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-item p {
    font-weight: bold;
    font-size: 1rem;
}

/* Map section */
.map-section {
    width: 100%;
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#map {
    width: 100%;
    height: 400px; /* Set a fixed height */
    border-radius: 6px;
    background-color: #f5f5f5;
}

.map-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.speed-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.speed-label {
    color: #666;
    font-weight: 500;
}

#current-speed {
    color: #673ab7;
    font-weight: 700;
    font-size: 16px;
}

.map-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.marker-icon {
    background-color: #000;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Impact section */
.impact-section {
    background-color: #f5f0ff;
    border-left: 4px solid #673ab7;
}

.impact-details {
    color: #666;
    font-size: 0.9rem;
}

.current-forces {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.force-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.force-label {
    font-size: 0.9rem;
    color: #666;
}

#current-acceleration {
    font-weight: bold;
    font-size: 1rem;
    color: #673ab7;
}

.force-meter {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.meter-bar {
    height: 12px;
    background-color: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.meter-fill {
    height: 100%;
    background-color: #673ab7;
    width: 0;
    transition: width 0.2s ease-out;
    border-radius: 6px;
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #888;
}

/* Video section */
.video-section {
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
}

.video-container {
    position: relative;
    width: 100%;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1rem;
    display: flex;
    align-items: center;
    transition: opacity 0.3s;
    opacity: 0.7;
}

.video-container:hover .video-controls {
    opacity: 1;
}

.video-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    margin-right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.video-btn:hover {
    background-color: rgba(255,255,255,0.4);
}

.video-progress {
    flex: 1;
    height: 6px;
    background-color: rgba(255,255,255,0.3);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    margin: 0 1rem;
}

.progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: #673ab7;
    border-radius: 3px;
    transition: width 0.1s;
}

.video-time {
    color: white;
    font-size: 0.9rem;
    min-width: 80px;
    text-align: right;
}

/* Screenshots section */
.screenshots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
}

.screenshot {
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.screenshot:hover {
    transform: scale(1.03);
}

.screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Video thumbnails */
.video-thumbnail {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.video-thumbnail .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

/* Description and AI summary sections */
.description-section, .summary-section, .message-section {
    line-height: 1.6;
}

.description-section p, .summary-section p, .message-section p {
    margin-bottom: 1rem;
}

.user-description, .ai-summary, .message-preview {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.nexar-summary p:first-child {
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
}

.message-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

.message-body p {
    margin-bottom: 1rem;
}

.attachment {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-size: 0.9rem;
}

.attachment i {
    color: #673ab7;
}

.attachment a {
    margin-left: auto;
    color: #673ab7;
    text-decoration: none;
}

/* Timeline section */
.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e0e0e0;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-number {
    position: absolute;
    left: -3rem;
    top: 0;
    width: 30px;
    height: 30px;
    background-color: #673ab7;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 1;
}

.timeline-content h3 {
    color: #673ab7;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Analysis sections */
.sensor-chart, .speed-chart {
    margin-top: 20px;
    height: 300px;
    width: 100%;
    background: #f9f9f9;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

.sensor-chart canvas, .speed-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Footer */
footer {
    background-color: #f5f5f5;
    color: #666;
    text-align: center;
    padding: 1rem;
    margin-bottom: 60px;
}

/* Tab navigation */
.tab-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 100;
}

.tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease;
}

.tab.active {
    color: #673ab7;
}

.tab i {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.tab span {
    font-size: 0.7rem;
}

/* Responsive styles */
@media (max-width: 768px) {
    .info-group {
        grid-template-columns: 1fr;
    }
    
    .header-actions {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }
    
    .event-selector {
        width: 100%;
        max-width: 200px;
    }
    
    h1 {
        font-size: 1.2rem;
    }
    
    .tab span {
        font-size: 0.6rem;
    }
    
    .events-list {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .screenshots-container {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .driver-info {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* Error handling */
.events-list p {
    color: #666;
    text-align: center;
    margin: 1rem 0;
}

.retry-btn {
    display: block;
    margin: 1rem auto;
    padding: 0.5rem 1.5rem;
    background-color: #673ab7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.retry-btn:hover {
    background-color: #5e35b1;
}

/* Error toast notification */
.error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 250px;
    max-width: 400px;
    transform: translateX(110%);
    transition: transform 0.3s ease-in-out;
}

.error-toast.show {
    transform: translateX(0);
}

.error-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-content i {
    font-size: 18px;
}

.close-toast {
    background: none;
    border: none;
    color: #721c24;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}

/* Screenshot loading and overlay */
.screenshot-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.screenshot-loading .spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #673ab7;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-bottom: 0.5rem;
}

.screenshot-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 0.5rem;
    color: white;
    font-size: 0.8rem;
    text-align: center;
}

.screenshot {
    position: relative;
    height: 180px;
    cursor: pointer;
    background-color: #f5f5f5;
}

.screenshot canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

/* Speed stats */
.speed-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    background-color: #f5f0ff;
    padding: 1rem;
    border-radius: 4px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #673ab7;
}

/* Acceleration stats */
.acceleration-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    background-color: #f5f0ff;
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid #673ab7;
}

/* Chart controls */
.chart-controls {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.chart-btn {
    background-color: #f5f0ff;
    border: 1px solid #673ab7;
    border-radius: 4px;
    color: #673ab7;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-btn:hover {
    background-color: #e2d7f8;
    transform: translateY(-1px);
}

.chart-btn.active {
    background-color: #673ab7;
    color: white;
}

.sensor-chart {
    height: 300px;
    position: relative;
}

.sensor-chart canvas {
    width: 100%;
    height: 100%;
}

/* AI Summary Tab Styles */
.primary-btn {
    background-color: #673ab7;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s;
    margin: 1rem 0;
}

.primary-btn:hover {
    background-color: #5e35b1;
}

.secondary-btn {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s;
    margin-right: 10px;
}

.secondary-btn:hover {
    background-color: #e0e0e0;
}

.hint-text {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.small-text {
    color: #888;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.ai-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.ai-loading-container .loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #673ab7;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.ai-results-container {
    margin-top: 1.5rem;
}

.ai-summary-section, .ai-timeline-section {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ai-summary {
    line-height: 1.6;
    color: #333;
}

.ai-timeline {
    margin-top: 1rem;
}

.ai-timeline-item {
    display: flex;
    margin-bottom: 1rem;
    position: relative;
}

.ai-timeline-time {
    min-width: 80px;
    font-weight: bold;
    color: #673ab7;
    padding-right: 1rem;
}

.ai-timeline-content {
    border-left: 2px solid #673ab7;
    padding-left: 1rem;
    padding-bottom: 1rem;
    position: relative;
}

.ai-timeline-content::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #673ab7;
}

.ai-timeline-content p {
    margin: 0;
}

.ai-actions {
    display: flex;
    margin-top: 1.5rem;
}

.ai-summary .editing {
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 4px;
    min-height: 100px;
    outline: none;
}

/* AI Analysis Styles */
.ai-description {
    margin-bottom: 1rem;
    line-height: 1.5;
}

.ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: #f5f5f5;
    border-radius: 4px;
    text-align: center;
}

.ai-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #673ab7;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.ai-loading .small-text {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
}

.error-message {
    padding: 1rem;
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    color: #c62828;
    margin: 1rem 0;
}

.ai-timeline {
    margin-top: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1rem;
    background-color: #f9f9f9;
}

.ai-timeline-date {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
    color: #444;
}

.timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
}

.timeline-list li:last-child {
    border-bottom: none;
}

.timeline-list .time {
    font-weight: bold;
    color: #673ab7;
    width: 100px;
    margin-right: 1rem;
}

.timeline-list .event {
    font-weight: 500;
    color: #333;
    margin-right: 1rem;
    flex: 1;
}

.timeline-list .details {
    flex-basis: 100%;
    margin-top: 0.25rem;
    padding-left: 100px; /* Align with time indent */
    color: #666;
    font-size: 0.9rem;
}

/* Add the following to the header section styling of styles.css */

.nexar-logo {
    height: 30px;
    margin-right: 20px;
    vertical-align: middle;
}

/* Refresh button styling */
.refresh-btn {
    background-color: #673ab7;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background-color: #5e35b1;
    transform: scale(1.05);
}

.refresh-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.refresh-btn i {
    margin-right: 5px;
}

/* File upload styles */
.upload-instruction {
    margin-bottom: 20px;
    color: #666;
}

.file-uploads-container {
    margin-bottom: 30px;
}

.file-uploads-container h3 {
    margin: 25px 0 15px;
    font-size: 1.1em;
    color: #333;
}

.file-category-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-category {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #ddd;
}

.category-name {
    font-weight: 500;
}

.add-file-btn {
    background-color: #673ab7;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-file-btn:hover {
    background-color: #5e35b1;
    transform: scale(1.1);
}

.file-list {
    padding: 10px 15px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

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

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    color: #673ab7;
    font-size: 1.2em;
}

.file-name {
    font-size: 0.9em;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.file-action-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.9em;
    transition: color 0.2s ease;
}

.file-action-btn:hover {
    color: #673ab7;
}

.no-files {
    color: #999;
    font-style: italic;
    font-size: 0.9em;
}

.add-all-files-row {
    margin-top: 20px;
}

.add-all-files {
    background-color: #f0ebf8;
}

.continue-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 20px;
}

.continue-btn:hover {
    background-color: #43a047;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.file-upload-form .form-group {
    margin-bottom: 15px;
}

.file-upload-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.file-upload-form select,
.file-upload-form input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
}

.file-input-container {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.2s ease;
}

.file-input-container:hover,
.file-input-container.dragover {
    border-color: #673ab7;
}

.file-input {
    position: absolute;
    left: -9999px;  /* Move it off-screen instead of using opacity */
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.file-input-label {
    margin-bottom: 10px;
}

.file-input-label i {
    font-size: 2em;
    color: #673ab7;
    margin-bottom: 10px;
}

.file-input-label span {
    display: block;
    color: #666;
}

.selected-file {
    display: none;
    background-color: #f9f9f9;
    padding: 8px;
    border-radius: 4px;
    margin-top: 10px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-progress {
    height: 6px;
    background-color: #f0f0f0;
    border-radius: 3px;
    margin: 15px 0;
    overflow: hidden;
    display: none;
}

.upload-progress .progress-bar {
    height: 100%;
    background-color: #673ab7;
    width: 0;
    transition: width 0.3s ease;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Description textarea */
#incident-description {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9em;
    resize: vertical;
    margin-top: 8px;
}

/* Add these styles for the upload button and event actions */
.event-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.upload-event-btn {
    background-color: #673ab7;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.upload-event-btn:hover {
    background-color: #5e35b1;
}

/* Upload Event Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal.active {
    display: block;
}

.modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 800px;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background-color: #673ab7;
    color: white;
    padding: 15px 20px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.close-modal {
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #e0e0e0;
}

.modal-body {
    padding: 20px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

/* Upload Sections */
.upload-sections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.upload-section {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.upload-section h3 {
    background-color: #f5f5f5;
    padding: 10px 15px;
    margin: 0;
    font-size: 16px;
    border-bottom: 1px solid #ddd;
}

.file-drop-area {
    padding: 30px 15px;
    text-align: center;
    background-color: #fafafa;
    border: 2px dashed #ddd;
    margin: 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.file-drop-area:hover {
    background-color: #f0f0f0;
    border-color: #bbb;
}

.file-drop-area.dragover {
    background-color: #e8f0fe;
    border-color: #673ab7;
}

.file-msg {
    display: block;
    margin-bottom: 10px;
    color: #666;
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.selected-file-info {
    padding: 0 15px 15px;
    font-size: 13px;
    color: #333;
    display: none;
}

.selected-file-info.active {
    display: block;
}

/* Upload Progress */
.upload-progress-container {
    margin-bottom: 20px;
}

.upload-progress {
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-bar {
    height: 100%;
    background-color: #673ab7;
    width: 0;
    transition: width 0.3s;
}

#upload-status {
    font-size: 14px;
    color: #666;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.cancel-btn {
    padding: 10px 20px;
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cancel-btn:hover {
    background-color: #e0e0e0;
}

.submit-btn {
    padding: 10px 20px;
    background-color: #673ab7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #5e35b1;
}

.submit-btn:disabled {
    background-color: #9e9e9e;
    cursor: not-allowed;
}

.event-selector.hidden {
    display: none !important;
} 