/* ==========================================================================
   National High/Low Stylesheet
   ========================================================================== */

/* Main Container */
.product-body {
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    line-height: 1.6;
}

.pageformatting {
    padding: 1em;
    text-align: center;
    max-width: 960px; /* Keeps line lengths readable on wide screens */
    margin: 0 auto;
}

/* Typography & Titles */
.display-title {
    font-size: 1.75em;
    font-weight: bold;
    color: #003366; /* Classic NWS Dark Blue */
    margin-bottom: 0.25em;
}

.test-notice {
    font-weight: bold;
    color: #cc0000;
    margin-bottom: 1em;
}

/* ==========================================================================
 *    Centered Headers & Raw Text Box
 * ========================================================================== */

.header-center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    display: block;
}

.raw-text-section {
    margin: 2em auto;
    max-width: 800px;
    text-align: left;
}

.raw-text-title {
    font-size: 1.15em;
    color: #003366;
    margin-bottom: 0.5em;
    text-align: center;
}

.raw-text-box {
    background-color: #f4f4f4;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 1.5em;
    box-shadow: inset 0px 2px 4px rgba(0,0,0,0.05);
    overflow-x: auto; /* Adds scrollbar if text gets too wide */
}

.raw-text-box pre {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.95em;
    color: #333;
    margin: 0;
    line-height: 1.4;
    white-space: pre-wrap; /* Ensures long lines break nicely on mobile */
}


/* ==========================================================================
 *    Text Data Section (High / Low Stats)
 * ========================================================================== */

.hilo-data-section {
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 1.5em;
    margin: 1.5em auto;
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
    box-shadow: 0px 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
}

.hilo-header {
    font-size: 1.1em;
    margin-top: 0;
    margin-bottom: 1.5em;
    border-bottom: 1px solid #eee;
    padding-bottom: 1em;
}

.temp-container {
    display: flex;
    flex-wrap: wrap; /* Allows stacking on small screens/mobile */
    justify-content: space-between;
    gap: 1em;
    width: 100%;
    box-sizing: border-box;
}

.temp-box {
    flex: 1 1 250px; /* Chrome specific fix: explicit grow, shrink, and basis */
    min-width: 250px;
    max-width: 100%; /* Prevents the box from getting wider than the parent */
    padding: 1em;
    border-radius: 6px;
    text-align: center;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

/* Warm styling for the High temperature */
.high-temp {
    background-color: #fff5f5;
    border: 1px solid #ffcccc;
}

/* Cool styling for the Low temperature */
.low-temp {
    background-color: #f0f8ff;
    border: 1px solid #cce0ff;
}

.temp-label {
    display: block;
    font-weight: bold;
    color: #333;
    font-size: 1.05em;
}

.temp-date {
    display: block;
    font-size: 0.95em;
    color: #444;
    margin-top: 0.2em;
}

.temp-time {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 0.8em;
    font-style: italic;
}

.temp-value {
    display: block;
    font-size: 1.3em;
    font-weight: bold;
    color: #111;
}

.high-temp .temp-value {
    color: #b30000; /* Dark Red */
}

.low-temp .temp-value {
    color: #0044cc; /* Dark Blue */
}

.temp-locations {
    margin-top: 0.5em;
    font-size: 1.1em;
    font-weight: bold;
    color: #444;
}

.loc-line {
    margin-bottom: 0.2em;
}

/* Map Image Styling */
.map-container {
    margin: 1.5em 0;
}

.map-container img {
    max-width: 100%;
    width: 850px; /* Fallback to your original requested width */
    height: auto;
    border: 1px solid #ccc;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); /* Adds a subtle "pretty" depth */
}

/* ==========================================================================
 *    Disclaimer Section
 * ========================================================================== */

.disclaimer-section {
    margin: 0.5em auto 2em auto; /* Tight to the map, pushes elements below it down */
    max-width: 850px; /* Aligns with the width of the map */
    font-size: 0.85em;
    color: #555;
    text-align: left;
    line-height: 1.5;
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-left: 4px solid #003366; /* NWS blue accent line */
}

.disclaimer-section strong {
    color: #333;
    font-size: 1.1em;
}

.disclaimer-section a {
    color: #0055aa;
    text-decoration: none;
    font-weight: bold;
}

.disclaimer-section a:hover {
    text-decoration: underline;
}


/* ==========================================================================
 *    Action Links (Live Data & Archive)
 * ========================================================================== */

.action-links {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin: 1em 0 2em 0; /* Creates breathing room around the buttons */
    flex-wrap: wrap; /* Allows stacking on very small mobile screens */
}

.action-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
}

.action-btn:active {
    transform: scale(0.98); /* Satisfying click effect */
}

/* Specific styling for the Live Data button */
.live-btn {
    background-color: #ffffff;
    color: #0055aa;
    border: 1px solid #004488;
}

.live-btn:hover {
    background-color: #004488;
    color: white;
    text-decoration: none;
}

/* Specific styling for the Archive button */
.archive-btn {
    background-color: #ffffff;
    color: #0055aa;
    border: 1px solid #0055aa;
}

.archive-btn:hover {
    background-color: #f0f8ff;
    color: #003366;
    text-decoration: none;
}


/* Toggle Button */
.toggle-btn {
    font-size: 1.05em;
    font-weight: bold;
    color: #333;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    margin: 1.5em 0;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.toggle-btn:hover {
    background-color: #666;
    color: white;
}

/* ==========================================================================
 *  * Archive Search Widget
 *   * ========================================================================== */
.archive-widget {
    max-width: 850px;
    margin: 2em auto;
    padding: 1.5em;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    box-shadow: inset 0px 2px 4px rgba(0,0,0,0.02);
}

.archive-widget h3 {
    margin-top: 0;
    color: #003366;
    font-size: 1.25em;
    margin-bottom: 0.2em;
}

.archive-widget p {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 1.2em;
}

.archive-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1em;
    flex-wrap: wrap; /* Stacks nicely on mobile */
}

.archive-form input[type="date"] {
    padding: 9px 12px;
    font-size: 1em;
    border: 1px solid #aaa;
    border-radius: 5px;
    font-family: inherit;
    color: #333;
    cursor: pointer;
}

/* Screen reader only label for accessibility compliance */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}


/* FAQ Section */
.faq-section {
    text-align: left; /* Reading text should be left-aligned */
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    margin-top: 1em;
}

.faq-item {
    margin-bottom: 1.5em;
    padding-bottom: 1.5em;
    border-bottom: 1px solid #ddd;
}

.faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-item h3 {
    font-size: 1.15em;
    color: #003366;
    margin-top: 0;
    margin-bottom: 0.5em;
}

.faq-item p {
    margin-top: 0;
    margin-bottom: 1em;
}

.faq-item ul, .faq-item ol {
    margin-top: 0.5em;
    margin-bottom: 1em;
    padding-left: 2em;
}

.faq-item li {
    margin-bottom: 0.25em;
}

.note {
    font-size: 0.9em;
    color: #555;
}

/* ==========================================================================
 *    Mobile Responsive Fixes
 * ========================================================================== */
@media screen and (max-width: 768px) {
    /* Stacks the High and Low boxes vertically */
    .temp-container {
        flex-direction: column;
    }
    
    /* Stacks the Action buttons vertically */
    .action-links {
        flex-direction: column;
        align-items: center;
        gap: 0.5em;
    }
    
    /* Makes the buttons fill the screen nicely */
    .action-btn {
        width: 100%;
        max-width: 300px;
        box-sizing: border-box;
    }
}
