/**
 * Aviation Dashboard Styles Version: V1.5.0
 * Dashboard Page Styles
 */

body {
    height: 100vh;
    overflow: hidden;
}

#main-container { display: flex; height: 100%; width: 100%; }

h2 {
    color: var(--text-gray);
    font-weight: bold;
    margin-bottom: 12px;
    text-transform: uppercase;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
}

#left-pane { width: var(--left-pane-width); border-right: 2px solid var(--border); }
#map-frame { width: 100%; height: 100%; border: none; }
#right-pane { width: calc(100% - var(--left-pane-width)); display: flex; flex-direction: column; }

#right-top {
    flex: 1;
    padding: 20px;
    background-color: var(--bg-panel);
    border-bottom: 2px solid var(--border);
    overflow-y: auto;
}

.weather-box {
	margin-bottom: 20px;
}

.label {
	color: #888;
	font-size: 0.7rem;
	margin-bottom: 6px;
	font-weight: bold;
	letter-spacing: 1px;
}

.time-ago {
    font-size: 0.7rem;
    color: #666;
    margin-left: 8px;
    font-weight: normal;
}

.data-text {
    font-family: monospace;
    line-height: 1.6;
    font-size: 14px;
    word-wrap: break-word;
	transition: border-color 0.5s ease;
	white-space: normal;
}

.metar-style, .taf-style {
    white-space: pre-wrap;
    background-color: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 4px;
    margin-top: 5px;
    border-left: 6px solid #333;
    transition: border-color 0.5s ease;
}

.vfr  { border-left-color: var(--vfr) !important; }
.mvfr { border-left-color: var(--mvfr) !important; }
.ifr  { border-left-color: var(--ifr) !important; }
.lifr { border-left-color: var(--lifr) !important; }

/* TAF individual line indicators */
.taf-line {
    display: block; 
    padding: 2px 0 2px 5px; 
    margin-bottom: 2px;
    border-left: 4px solid transparent; /* Default is invisible */
    line-height: 1; 
    white-space: pre-wrap; 
}

/* Category Colors - Only these will show a bar */
.taf-line.mvfr { border-left-color: var(--mvfr); }
.taf-line.ifr  { border-left-color: var(--ifr); }
.taf-line.lifr { border-left-color: var(--lifr); }

/* Indentation for subsequent TAF lines */
.taf-indented {
    margin-left: 45px;
}

.highlight-alert {
    color: var(--alert-red);
    font-weight: bold;
}

#right-bottom {
    min-height: 120px;
    max-height: 60%;
    padding: 20px;
    background-color: #1a1a1a;
    overflow-y: auto;
    border-top: 1px solid var(--border);
}

/* --- Messaging System --- */
.message-item { 
    margin-bottom: 10px; 
    padding: 10px 14px;
    font-size: 14px;
    font-weight: bold;
    border-left: 4px solid;
    background-color: rgba(255, 255, 255, 0.02);
    animation: fadeIn 0.3s ease;
}

/* Info: White - For general notices */
.message-item.alert-info {
    color: #ffffff;
    border-left-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Warning: Yellow - For forecasts and cautions */
.message-item.alert-warning {
    color: var(--alert-yellow, #f1c40f);
    border-left-color: var(--alert-yellow, #f1c40f);
}

/* Danger: Red - For current hazards and high winds */
.message-item.alert-danger {
    color: var(--alert-red, #ff4d4d);
    border-left-color: var(--alert-red, #ff4d4d);
}

/* Critical: Solid Red - For immediate threats (TS, WS, etc.) */
.message-item.alert-critical {
    color: var(--alert-red, #ff4d4d);
    border-left-color: var(--alert-red, #ff4d4d);
}

/* Critical: Red - For immediate threats (TS, WS, etc.) */
.message-item.alert-critical {
    color: #ff4d4d;
    border-left-color: #ff4d4d;
    background-color: rgba(255, 77, 77, 0.1);
}

/* Animations & State */
.no-messages { color: #555; font-style: italic; font-size: 13px; }

@keyframes pulse-bg {
    0% { background-color: rgba(255, 77, 77, 0.1); }
    50% { background-color: rgba(255, 77, 77, 0.2); }
    100% { background-color: rgba(255, 77, 77, 0.1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-5px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- Logo Styling --- */
.alerts-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border);
}

.alerts-header h2 {
    margin-bottom: 0 !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    font-size: 0.95rem;
}

.logo-btn {
    display: flex;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.dashboard-logo-img {
    height: 22px;
    width: auto;
}

.logo-btn:hover {
    transform: scale(1.1);
	filter: invert(1)
}

.logo-btn:hover .dashboard-logo-img {
    filter: opacity(1);
}

/* --- Mobile Support --- */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }

    #main-container {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    #left-pane {
        width: 100%;
        height: 400px;
        order: 3;
        border-right: none;
        border-top: 2px solid var(--border);
    }

    #right-pane {
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        order: 1;
    }

    #right-top {
        order: 2;
        flex: none;
        padding: 15px;
    }

    #right-bottom {
        order: 1;
        height: auto;
        min-height: 100px;
        padding: 15px;
        border-bottom: 1px solid var(--border);
    }

    h2 {
        font-size: 1.2rem;
    }
    
    .data-text {
        font-size: 13px;
        padding: 10px;
    }
	
	.site-branding {
        display: none !important;
    }
}