:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--gray-100);
    color: var(--gray-900);
}

/* Header */
.header {
    background: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.header .subtitle {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

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

.current-time {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 1.25rem;
    color: var(--gray-700);
}

.connection-status {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.connection-status.connected {
    background: #dcfce7;
    color: var(--success);
}

.connection-status.disconnected {
    background: #fee2e2;
    color: var(--danger);
}

/* Controls */
.controls {
    background: white;
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
}

.add-airport {
    display: flex;
    gap: 0.5rem;
}

.icao-input {
    width: 120px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    font-size: 1rem;
    font-family: monospace;
    text-transform: uppercase;
}

.icao-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.filters {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.filters label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

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

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-200);
}

.btn-danger {
    background: white;
    color: var(--danger);
    border: 1px solid var(--gray-300);
}

.btn-danger:hover:not(:disabled) {
    background: #fee2e2;
}

.btn-icon {
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 0.25rem;
    font-size: 1rem;
}

.btn-icon:hover {
    background: var(--gray-100);
}

.btn-remove:hover {
    background: #fee2e2;
    color: var(--danger);
}

/* Error message */
.error-message {
    margin: 1rem 1.5rem;
    padding: 0.75rem 1rem;
    background: #fee2e2;
    color: var(--danger);
    border-radius: 0.375rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.error-message button {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--danger);
}

/* Loading & Empty state */
.loading, .empty-state {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--gray-500);
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h2 {
    color: var(--gray-700);
    margin: 0 0 0.5rem;
}

.empty-state .hint {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Airport list */
.airport-list {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Airport card */
.airport-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 2px solid transparent;
}

.airport-card.amd-alert {
    border-color: var(--danger);
    animation: pulse-border 1s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: var(--danger); }
    50% { border-color: #fca5a5; }
}

.airport-header {
    padding: 0.75rem 1rem;
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.airport-info {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.airport-info .icao {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: monospace;
}

.airport-info .country {
    font-size: 0.875rem;
    opacity: 0.9;
}

.airport-actions {
    display: flex;
    gap: 0.25rem;
}

.airport-actions .btn-icon {
    color: white;
}

.airport-actions .btn-icon:hover {
    background: rgba(255,255,255,0.2);
}

/* Report sections */
.report-section {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.report-section:last-child {
    border-bottom: none;
}

.report-section.new-report {
    background: #fef3c7;
}

.report-section.new-amd {
    background: #fee2e2;
    animation: blink-bg 1s ease-in-out infinite;
}

@keyframes blink-bg {
    0%, 100% { background: #fee2e2; }
    50% { background: #fecaca; }
}

.report-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.report-type {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
}

.report-type.taf {
    background: #dbeafe;
    color: #1e40af;
}

.report-type.metar {
    background: #dcfce7;
    color: #166534;
}

.badge {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.badge.amd {
    background: var(--danger);
    color: white;
}

.badge.cor {
    background: var(--warning);
    color: white;
}

.badge.speci {
    background: #7c3aed;
    color: white;
}

.report-time {
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-left: auto;
}

.report-time .age {
    color: var(--gray-500);
}

/* Report raw - VIGTIG: Viser hele strengen uden line break */
.report-raw {
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.875rem;
    background: var(--gray-50);
    padding: 0.75rem;
    border-radius: 0.25rem;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
}

/* Footer */
.footer {
    padding: 2rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .add-airport {
        width: 100%;
    }
    
    .icao-input {
        flex: 1;
    }
    
    .actions {
        justify-content: space-between;
    }
    
    .filters {
        margin-left: 0;
    }
}

/* Blazor fejl-UI - skjult som standard */
#blazor-error-ui {
    background: #ffdc00;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }
