/* Custom Design Tokens/Variables for Uniformity */
:root {
    --mu-gold: #F1B82D;
    --mu-black: #000000;
    --bg-gray: #f4f4f4;
    --panel-bg: #ffffff;
    --border-color: #cccccc;
    --text-main: #333333;
    --header-height: 90px; 
    --panel-shadow: 0 4px 6px rgba(0,0,0,0.1);
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --border-radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-gray);
    color: var(--text-main);
    padding-top: var(--header-height);
    line-height: 1.6;
}

/* Fixed Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--mu-black);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Logo and Signature Styles */
.logo-container {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Ensure objects behave like images and don't intercept pointer events 
    if we want the whole container to be clickable later */
.logo-container object {
    display: block;
    pointer-events: none;
    max-width: 100%;
}

/* Individual sizes for the SVG components */
.mu-logo-obj {
    height: 60px;
    width: auto;
}

.mesonet-title-obj {
    height: 56px;
    width: auto;
}

.extension-obj {
    height: 28px;
    width: auto;
}

.weathermap-obj {
    height: 56px;
    width: auto;
}

/* The vertical stack for the Mesonet text SVGs */
.mesonet-text-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--mu-gold);
}

.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: black;
    min-width: 180px;
    max-height: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1001;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 4px;
    overflow-y: auto;
}
.dropdown-content a {
    color: white;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    text-transform: none;
    font-weight: normal;
    border-radius: 0;
}
.dropdown-content a:hover {
    color: #F1B82D;
}
.dropdown:hover .dropdown-content {
    display: block;
}

.search-icon {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--mu-gold);
    margin-left: 1rem;
}

/* Main Container */
.main-wrapper {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

/* Map Section */
.map-section {
    background: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--panel-shadow);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 2400px;
    margin: 0 auto;
}

.map-header h1 { margin: 0; font-size: 1.5rem; color: var(--mu-black); }
.map-header { border-bottom: 2px solid var(--mu-gold); padding-bottom: 0.5rem; }

.map-viewport {
    width: 100%;
    height: 600px;
    background-color: #e0e0e0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    overflow: hidden; 
    cursor: grab;
    user-select: none;
    touch-action: none;
}

#map-content {
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
    will-change: transform;
    display: flex;
    align-items: center;
    justify-content: center;
}

#map-content svg {
    width: 100%;
    height: 100%;
    display: block;
}

.map-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

.control-btn {
    width: 44px;
    height: 44px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover { background: #f0f0f0; }

#map-loader-ui {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #666;
    z-index: 50;
}

#web-content {
    margin: 0 auto;
    width: 100%;
    height: 600px;
    max-width: 2400px;
    will-change: transform;
}

#web-content iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 2px solid var(--mu-black);
    border-radius: var(--border-radius);
    box-sizing: border-box;
}

/* Selection Panels */
.selection-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel-box {
    background: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--panel-shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.panel-title {
    background: var(--mu-black);
    color: white;
    padding: 0.6rem 1rem;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-container {
    position: relative;
    margin-top: auto;
    margin-left: 1px;
    margin-right: 1px;
    padding: 2px;
    background: var(--panel-bg);
    border-radius: var(--border-radius);
}

.form-container p {
    padding-bottom: 1px;
    padding-top: 8px;
    text-align: center;
    text-decoration: bold;
    color: var(--mu-black);
    margin-bottom: 2px;
}

.section-area {
    padding: 1px;
    padding-top: 4px;
    width: 100%;
    height: 100%;
    overflow: visible;
    box-shadow: 0 4px 0 0 inset black;
}

.section-area select{
    margin: auto;
}

.form-container select {
    border-radius: var(--border-radius);
    border-color: var(--mu-black);
    border-width: 1px;
    box-shadow: var(--panel-shadow);
}

.form-container option {
    font-family: var(--font-family);
    font-weight: 0.9rem;
    padding: 2px;
}

.list-container {
    position: relative;
    height: flex;
    max-height: 180px;
    overflow-y: auto;
    padding: 0;
    background: #fff;
}

.list-item {
    padding: 0.6rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.list-item:hover {
    background-color: #f9f9f9;
    padding-left: 1.25rem;
}

.list-item.selected {
    background-color: var(--mu-gold);
    color: black;
    font-weight: bold;
    border-left: 5px solid var(--mu-black);
}

/* Go Button */
.go-button {
    width: 100%;
    padding: 1.25rem;
    background-color: var(--mu-gold);
    color: var(--mu-black);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.4;
    pointer-events: none;
    box-shadow: 0 4px 0 #c4921d;
    position: relative;
    top: 0;
}

.go-button.active {
    opacity: 1;
    pointer-events: auto;
}

.go-button.active:hover {
    background-color: #ffc947;
    top: -2px;
    box-shadow: 0 6px 0 #c4921d;
}

.go-button.active:active {
    top: 2px;
    box-shadow: 0 2px 0 #c4921d;
}

/* Forecast Section */
.forecast-section {
    grid-column: 1 / span 2;
    background: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--panel-shadow);
    padding: 1.5rem;
    margin-top: 1rem;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
    margin-top: 1.5rem;
}

.forecast-day {
    text-align: center;
    padding: 1rem;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 4px;
}

.day-name {
    font-weight: bold;
    color: var(--mu-black);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.icon-placeholder {
    font-size: 2.2rem;
    margin: 0.75rem 0;
    display: block;
}

.temp-high { font-weight: bold; color: #d32f2f; font-size: 1.1rem; }
.temp-low { color: #1976d2; font-size: 1rem; }


.info-panel {
    background: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--panel-shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.info-header { border-bottom: 2px solid var(--mu-gold); padding-bottom: 0.5rem; }
.info-header h2 { margin: 0; padding: 2px; font-size: 1.4rem; color: var(--mu-black); text-align: center;}

.info-content {
    text-align: center;
    margin: 2px;
}

footer {
    margin-top: 4rem;
    padding: 3rem;
    background-color: var(--mu-black);
    color: #ccc;
    text-align: center;
}

/* Mobile Adaptations */
@media (max-width: 900px) {
    header {
        height: auto;
        flex-direction: column;
        padding: 1rem;
    }
    body { padding-top: 160px; }
    .main-wrapper { grid-template-columns: 1fr; }
    .forecast-grid { grid-template-columns: repeat(4, 1fr); }
    .selection-container { order: -1; }
}