/* style.css - NWS Aberdeen EM Briefing Portal */

:root {
    --navy: #1a2745;
    --blue: #005ea2;
    --light-blue: #e1f3f8;
    --warning-red: #b50909;
    --watch-orange: #e5a841;
    --gray-10: #f0f0f0;
    --gray-30: #adadad;
    --text-main: #1b1b1b;
}

body {
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-main);
    margin: 0;
    background-color: #fbfbfb;
}

/* Layout & Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start; /* Prevents sidebar from stretching */
}

@media (max-width: 800px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* Navigation */
header {
    background-color: var(--navy);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-title {
    font-size: 1.25rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.tab-bar {
    background-color: white;
    border-bottom: 1px solid var(--gray-30);
    display: flex;
    justify-content: center;
    overflow-x: auto;
    white-space: nowrap;
}

.tab-item {
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--blue);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    border-bottom: 4px solid transparent;
    transition: all 0.2s ease;
}

.tab-item:hover {
    background-color: var(--light-blue);
    border-bottom: 4px solid var(--blue);
}

.tab-item.active {
    border-bottom: 4px solid var(--blue);
    color: var(--navy);
}

/* Hazard Alerts */
.hazard-banner {
    background-color: var(--warning-red);
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Card Styling */
.card {
    background: white;
    border: 1px solid #dfe1e2;
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.full-width-card {
    width: 94.3%;
    margin-bottom: 2rem;
}

.card h2 {
    margin-top: 0;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--light-blue);
    padding-bottom: 0.5rem;
}

/* Impact Outlook */
.impact-outlook {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
}

.impact-day {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    border-radius: 4px;
    background: var(--gray-10);
    font-size: 0.8rem;
}

.impact-level {
    height: 10px;
    width: 100%;
    margin-top: 5px;
    border-radius: 2px;
}

.level-low { background-color: #27ae60; }
.level-med { background-color: #f1c40f; }
.level-high { background-color: #e67e22; }

/* Buttons & Links */
.btn {
    display: inline-block;
    background-color: var(--blue);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 1rem;
}

.btn:hover { background-color: #1a4480; }

.link-list {
    list-style: none;
    padding: 0;
}

.link-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.link-list a {
    color: var(--blue);
    text-decoration: none;
}

.link-list a:hover { text-decoration: underline; }

/* Sub-Tab Navigation (USWDS Style) */
.usa-button-group {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sub-tab-btn {
    background-color: #ffffff;
    border: 1px solid #adadad;
    color: #005ea2;
    cursor: pointer;
    font-family: 'Public Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.1s;
    margin-right: -1px;
}

.sub-tab-btn:hover {
    background-color: #f0f0f0;
}

.sub-tab-btn.active {
    background-color: #1a2745;
    color: #ffffff;
    border-color: #1a2745;
    z-index: 10;
    position: relative;
}

/* Media Display Area */
.image-stage {
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 450px;
    overflow: hidden;
}

.main-img {
    max-width: 100%;
    height: auto;
    display: block;
}

.iframe-container {
    height: 500px;
    width: 100%;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Overlay Navigation */
.nav-overlay {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
}

.arrow-btn {
    background: rgba(26, 39, 69, 0.85);
    color: white;
    border: none;
    padding: 16px 12px;
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 4px;
    pointer-events: auto;
    transition: background 0.2s;
}

.arrow-btn:hover { background: #1a2745; }

/* Viewers & Components */
.viewer-footer {
    background: #f0f0f0;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    border-top: 1px solid #adadad;
    color: #1b1b1b;
}

.key-messages-box {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
    padding: 10px;
    background-color: var(--light-blue);
    border-left: 5px solid var(--blue);
    border-radius: 4px;
    white-space: pre-wrap;
}

/* Spot Request Button Styling */
.spot-btn {
	display: block;
	width: 90%;
	background-color: #b50909; /* USWDS Red */
	color: white;
	text-align: center;
	padding: 1rem;
	font-size: 1rem;
	font-weight: 700;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 4px;
	border: none;
	transition: background-color 0.2s;
}

.spot-btn:hover {
	background-color: #8a0606;
	text-decoration: none;
}

.ws-viewport {
	width: 100%;
	height: 600px; /* Reduced from 900px to crop the bottom sooner */
	position: relative;
	overflow: hidden;
	border: 1px solid #ccc;
	background: #fff;
}

	@media (max-width: 800px) {
		.ws-viewport {
			height: 500px; /* Even shorter for mobile */
		}
}