/* Custom styles for ATC Transcription System */

:root {
    --emergency-red: #dc3545;
    --warning-yellow: #ffc107;
    --success-green: #198754;
    --primary-blue: #0d6efd;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.4rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1rem;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Emergency indicators */
.emergency-keyword {
    background-color: var(--emergency-red);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
}

.emergency-code-7500 {
    background-color: #8B0000;
    color: white;
}

.emergency-code-7600 {
    background-color: #FF8C00;
    color: white;
}

.emergency-code-7700 {
    background-color: var(--emergency-red);
    color: white;
}

/* Audio player styles */
.audio-player {
    width: 100%;
    margin: 10px 0;
}

/* Transcription display */
.transcription-text {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
}

.keyword-highlight {
    background-color: yellow;
    padding: 1px 3px;
    border-radius: 2px;
}

.emergency-highlight {
    background-color: #ffebee;
    border-left: 4px solid var(--emergency-red);
    padding: 2px 6px;
    margin: 2px 0;
}

/* Status badges */
.status-pending {
    background-color: #6c757d;
}

.status-processing {
    background-color: var(--warning-yellow);
    color: #000;
}

.status-completed {
    background-color: var(--success-green);
}

.status-failed {
    background-color: var(--emergency-red);
}

/* Progress bars */
.transcription-progress {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.transcription-progress .progress-bar {
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
}

/* Flight track visualization */
.flight-track {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    background-color: white;
}

.flight-position {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.emergency-squawk {
    border-left: 4px solid var(--emergency-red);
    background-color: #ffebee;
}

/* Case management */
.case-card {
    transition: transform 0.2s ease;
}

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

.case-priority-high {
    border-left: 4px solid var(--emergency-red);
}

.case-priority-medium {
    border-left: 4px solid var(--warning-yellow);
}

.case-priority-low {
    border-left: 4px solid var(--success-green);
}

/* File upload */
.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 0.375rem;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s ease;
}

.file-upload-area:hover {
    border-color: var(--primary-blue);
}

.file-upload-area.dragover {
    border-color: var(--primary-blue);
    background-color: #f0f8ff;
}

/* Tables */
.table-audio-files th {
    background-color: #f8f9fa;
    border-top: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* Animation for processing status */
@keyframes processing {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.processing-indicator {
    animation: processing 2s infinite;
}

/* Emergency dashboard specific styles */
.emergency-dashboard .alert {
    border-left-width: 4px;
}

.emergency-timeline {
    position: relative;
    padding-left: 2rem;
}

.emergency-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #dee2e6;
}

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

.emergency-timeline-item::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    background-color: var(--emergency-red);
    border-radius: 50%;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
