/**
 * EPW Weather Station v1.8.0
 * Exact replication of EstesParkWeather.net styling
 * + Green text flash on AJAX update
 * + Responsive for tablet and mobile
 * + Alerts section 100% width
 * + Sidebar styles
 * + All font sizes 0.92em !important
 */

/* ============================================
   BASE / ORIGINAL STYLES
   ============================================ */

.epw-weather-wrapper {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 0.92em !important;
    color: #000000;
    line-height: 1.4;
    max-width: 100%;
}

.epw-weather-wrapper * {
    box-sizing: border-box;
}

.epw-weather-wrapper table {
    border-collapse: separate;
}

.epw-weather-wrapper .data {
    color: #000000;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 0.92em !important;
    border-bottom: 1px solid #CCCCCC;
    background-color: #FFFFFF;
    text-align: left;
}

.epw-weather-wrapper .datahead {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 0.92em !important;
    font-weight: bold;
    color: #FFFFFF;
    background-color: #212757;
    text-align: center;
}

.epw-weather-wrapper .data1 {
    color: #000000;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 0.92em !important;
    border-bottom: 1px solid #CCCCCC;
    background-color: #FFFFFF;
    text-align: left;
}

.epw-weather-wrapper .column-light {
    color: black;
    background-color: white;
}

.epw-weather-wrapper .column-dark {
    color: #006;
    background-color: #CCCCCC;
    padding: 4px;
}

.epw-weather-wrapper h3.datahead {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 0.92em !important;
    font-weight: bold;
    color: #FFFFFF;
    background-color: #212757;
    text-align: center;
    padding: 4px;
    margin: 0;
}

.epw-weather-wrapper h4 {
    margin: 0.5em 0;
}

.epw-weather-wrapper .epw-story,
.epw-weather-wrapper .story {
    margin: 0;
    padding: 0;
}

.epw-weather-wrapper .epw-forecastbox,
.epw-weather-wrapper .forecastbox {
    border: 2px solid #F00;
    color: #000000;
    background-color: #FFFF66;
    margin: 0.6em 0;
    max-width: 100%;
    text-align: left;
    padding: 2px 12px;
}

.epw-weather-wrapper .forecastbox h4,
.epw-weather-wrapper .epw-forecastbox h4 {
    margin: 0.3em 0;
    font-size: 0.92em !important;
}

.epw-weather-wrapper .advisoryBox {
    background-color: #FFFF66;
    border: 2px solid #F00;
    color: #000000;
    margin: 0.6em 0;
    padding: 2px 12px;
    text-align: left;
}

.epw-weather-wrapper .NOAA {
    margin: 0;
    padding: 0;
}

.epw-weather-wrapper a {
    color: #0033CC;
    text-decoration: underline;
}

.epw-weather-wrapper a:hover {
    color: #FF0000;
}

.epw-weather-wrapper .hidden-container {
    display: none;
}

.epw-weather-wrapper sup {
    font-size: 0.7em;
    vertical-align: super;
}

.epw-error {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 0.92em !important;
    color: #CC0000;
    background-color: #FFF3F3;
    border: 1px solid #CC0000;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
}

/* ============================================
   GREEN TEXT FLASH ON AJAX UPDATE (3 seconds)
   ============================================ */

@keyframes epwFlashGreen {
    0%   { color: #00CC00; }
    60%  { color: #00CC00; }
    100% { color: inherit; }
}

.epw-flash {
    animation: epwFlashGreen 3s ease-out !important;
}

/* ============================================
   LARGER FONT FOR FEELS-LIKE VALUE
   ============================================ */

.epw-weather-wrapper #ajaxfeelslike {
    font-size: 14pt;
    font-weight: bold;
}

/* ============================================
   CONDITIONS TABLE WRAPPER
   ============================================ */

.epw-conditions-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   WEBCAM LINK — display below image, not beside
   ============================================ */

.epw-weather-wrapper .epw-current-conditions a[href*="webcam"] + a,
.epw-weather-wrapper .epw-current-conditions p > a[href="#thumb1"] {
    display: block !important;
    text-align: center;
    margin-top: 4px;
}

.epw-weather-wrapper .epw-current-conditions td[valign="top"] p {
    text-align: center;
}

.epw-weather-wrapper .epw-current-conditions td[valign="top"] p a img#myPull {
    display: block;
    margin: 0 auto;
}

/* ============================================
   ALERTS DETAIL SECTION
   ============================================ */

.epw-weather-wrapper .epw-alerts-detail {
    font-size: 0.92em !important;
    width: 100%;
}

.epw-weather-wrapper .epw-alerts-detail #main-copy {
    width: 100% !important;
    max-width: 100%;
}

.epw-weather-wrapper .epw-alerts-detail div[style*="width:632px"],
.epw-weather-wrapper .epw-alerts-detail div[style*="width: 632px"] {
    width: 100% !important;
    max-width: 100% !important;
}

.epw-weather-wrapper .epw-alerts-detail div[style*="width:630px"],
.epw-weather-wrapper .epw-alerts-detail div[style*="width: 630px"] {
    width: 100% !important;
    max-width: 100% !important;
}

.epw-weather-wrapper .epw-alerts-detail table {
    width: 100% !important;
    max-width: 100%;
}

.epw-weather-wrapper .epw-alerts-detail table[width="610px"] {
    width: 100% !important;
}

.epw-weather-wrapper .epw-alerts-detail pre {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-x: auto;
}

.epw-weather-wrapper .epw-alerts-detail h3 {
    text-align: center;
    margin: 10px 0;
}

@media screen and (max-width: 768px) {
    .epw-weather-wrapper .epw-alerts-detail table td {
        display: block !important;
        width: 100% !important;
        padding-left: 10px !important;
    }
}

/* ============================================
   ALERTS SECTION — force 100% width
   ============================================ */

.epw-weather-wrapper .epw-alerts,
.epw-weather-wrapper .epw-current-conditions > div[style*="width:632px"],
.epw-weather-wrapper .epw-current-conditions > div[style*="width: 632px"],
.epw-weather-wrapper .epw-alerts > div[style*="width:632px"],
.epw-weather-wrapper .epw-alerts > div[style*="width: 632px"] {
    width: 100% !important;
    max-width: 100% !important;
}

.epw-weather-wrapper .epw-alerts table,
.epw-weather-wrapper .epw-current-conditions > div[style*="width:632px"] table,
.epw-weather-wrapper .epw-current-conditions > div[style*="width: 632px"] table {
    width: 100% !important;
}

/* ============================================
   SIDEBAR STYLES (replicated from WX.css, scoped)
   ============================================ */

.epw-weather-wrapper .epw-sidebar {
    font-size: 0.92em !important;
}

.epw-weather-wrapper .epw-sidebar h2 {
    font-size: 12pt !important;
    color: #FFFFFF !important;
    background-color: #212757 !important;
    text-align: center !important;
    margin-right: 0 !important;
    padding: 4px !important;
    margin-top: 10px;
    margin-bottom: 5px;
}

/* WX.css classes scoped to sidebar */
.epw-weather-wrapper .epw-sidebar .meas {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 0.92em !important;
    color: #000000;
    background-color: #FFFFFF;
    text-align: left;
}

.epw-weather-wrapper .epw-sidebar .bigtemp {
    font-family: Impact, Charcoal, sans-serif;
    font-size: 28pt !important;
    font-weight: bold;
    color: #000000;
    text-align: center;
    padding: 5px 0;
}

.epw-weather-wrapper .epw-sidebar .style1 {
    font-size: 0.92em !important;
}

.epw-weather-wrapper .epw-sidebar .style2 {
    color: #990000;
    font-weight: bold;
}

.epw-weather-wrapper .epw-sidebar .codebox {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 0.92em !important;
    color: #000000;
    background-color: #FFFF66;
    border: 2px solid #F00;
    padding: 4px;
    text-align: left;
}

.epw-weather-wrapper .epw-sidebar .relatedLinks {
    font-size: 0.92em !important;
    padding: 4px 0;
}

.epw-weather-wrapper .epw-sidebar .feature {
    margin-bottom: 10px;
}

.epw-weather-wrapper .epw-sidebar img#myPull {
    max-width: 100%;
    height: auto;
}

.epw-weather-wrapper .epw-sidebar #advert {
    text-align: center;
    margin-bottom: 10px;
}

.epw-weather-wrapper .epw-sidebar #headlines {
    width: 100%;
}

.epw-weather-wrapper .epw-sidebar #headlines table {
    width: 100% !important;
}

/* ============================================
   RESPONSIVE: TABLET (768px and below)
   ============================================ */

@media screen and (max-width: 768px) {
    .epw-weather-wrapper {
        font-size: 0.92em !important;
    }

    .epw-weather-wrapper table {
        max-width: 100% !important;
        width: 100% !important;
    }

    .epw-weather-wrapper table[width] {
        width: 100% !important;
    }

    .epw-weather-wrapper div[style*="width:632px"],
    .epw-weather-wrapper div[style*="width: 632px"] {
        width: 100% !important;
        margin: 0 !important;
    }

    .epw-weather-wrapper table[style*="width:630px"],
    .epw-weather-wrapper table[style*="width: 630px"] {
        width: 100% !important;
    }

    .epw-weather-wrapper table[width="185"],
    .epw-weather-wrapper table[width="180"],
    .epw-weather-wrapper table[width="166"],
    .epw-weather-wrapper table[width="160"] {
        width: 100% !important;
    }

    .epw-weather-wrapper .highslide-gallery img {
        width: 100% !important;
        height: auto !important;
    }

    .epw-nws-forecast table[width="100%"] td[style*="width: 11%"] {
        min-width: 75px;
    }
}

/* ============================================
   RESPONSIVE: MOBILE (576px and below)
   ============================================ */

@media screen and (max-width: 576px) {
    .epw-weather-wrapper {
        font-size: 0.92em !important;
    }

    .epw-weather-wrapper .datahead {
        font-size: 0.92em !important;
        padding: 4px 2px;
    }

    .epw-weather-wrapper .data1,
    .epw-weather-wrapper .data {
        font-size: 0.92em !important;
    }

    /* Stack main 4-column conditions into single column */
    .epw-conditions-table-wrapper table > tbody > tr > td {
        display: block !important;
        width: 100% !important;
    }

    .epw-conditions-table-wrapper table table > tbody > tr > td {
        display: table-cell !important;
    }

    .epw-conditions-table-wrapper > table > tbody > tr > td > table > tbody > tr > td[valign="top"],
    .epw-conditions-table-wrapper > table > tbody > tr > td > table > tbody > tr > td[align="center"] {
        display: block !important;
        width: 100% !important;
    }

    .epw-conditions-table-wrapper td.datahead {
        display: block !important;
        width: 100% !important;
    }

    .epw-conditions-table-wrapper td[rowspan] {
        display: block !important;
        width: 100% !important;
    }

    .epw-weather-wrapper img[id="myPull"] {
        width: 100% !important;
        max-width: 200px !important;
        height: auto !important;
    }

    .epw-weather-wrapper span[style*="font-size:24px"] {
        font-size: 22px !important;
    }

    .epw-weather-wrapper img[src*="thermometer"] {
        height: 140px !important;
        width: auto !important;
    }

    .epw-forecast-outlook td[style*="width: 80px"],
    .epw-forecast-outlook td[style*="width: 504px"] {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
    }

    .epw-nws-forecast table[width="100%"],
    .epw-nws-forecast table[style*="width:100%"] {
        width: 100% !important;
    }

    /* NWS forecast (advforecast2.php) day/text rows render as
       <td style="width:20%;"> (day) + <td style="width:80%"> (text) — note NO space
       after the colon, so the old `width: 20%` selectors never matched. On phones the
       20% day column is too narrow and day names break mid-word ("Aftern/oon"). Widen
       the day column to 40% (text 60%) and only allow wrapping between words. */
    .epw-weather-wrapper table[width="630"] td[style*="width:20%"],
    .epw-weather-wrapper table[width="630"] td[style*="width: 20%"],
    .epw-nws-forecast table[style*="border: 0"] td[style*="width:20%"],
    .epw-nws-forecast table[style*="border: 0"] td[style*="width: 20%"] {
        width: 40% !important;
        font-weight: bold;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }

    .epw-weather-wrapper table[width="630"] td[style*="width:80%"],
    .epw-weather-wrapper table[width="630"] td[style*="width: 80%"],
    .epw-nws-forecast table[style*="border: 0"] td[style*="width:80%"],
    .epw-nws-forecast table[style*="border: 0"] td[style*="width: 80%"] {
        width: 60% !important;
        padding-bottom: 8px !important;
    }

    .epw-weather-wrapper img[src*="moon"] {
        width: 40px !important;
        height: 40px !important;
    }

    .epw-weather-wrapper img[src*="wr-"] {
        width: 48px !important;
        height: 48px !important;
    }
}

/* ============================================
   RESPONSIVE: SMALL MOBILE (400px and below)
   ============================================ */

@media screen and (max-width: 400px) {
    .epw-weather-wrapper {
        font-size: 0.92em !important;
    }

    .epw-weather-wrapper .datahead {
        font-size: 0.92em !important;
    }

    .epw-weather-wrapper span[style*="font-size:24px"] {
        font-size: 18px !important;
    }

    .epw-weather-wrapper img[src*="thermometer"] {
        height: 110px !important;
    }

    .epw-nws-forecast table[width="100%"] > tbody > tr > td {
        min-width: 75px !important;
    }
}

/* ============================================
   RADAR SECTION
   ============================================ */

.epw-weather-wrapper .epw-radar {
    font-size: 0.92em !important;
    width: 100%;
}

.epw-weather-wrapper .epw-radar #main-copy {
    width: 100% !important;
    max-width: 100%;
}

.epw-weather-wrapper .epw-radar h2 {
    text-align: center;
    margin: 10px 0;
    font-size: 1.5em !important;
}

.epw-weather-wrapper .epw-radar h3 {
    text-align: center;
    margin: 10px 0;
}

.epw-weather-wrapper .epw-radar #selectorsarea {
    width: 100%;
    max-width: 100%;
}

.epw-weather-wrapper .epw-radar #selectorsarea table {
    width: 100% !important;
    max-width: 660px;
    margin: 0 auto;
}

.epw-weather-wrapper .epw-radar iframe {
    max-width: 100%;
    border: none;
}

.epw-weather-wrapper .epw-radar .center {
    width: 100% !important;
    max-width: 660px;
    margin: 0 auto;
}

@media screen and (max-width: 768px) {
    .epw-weather-wrapper .epw-radar #selectorsarea table td {
        display: block !important;
        width: 100% !important;
        text-align: center;
        padding: 5px 3px !important;
    }

    .epw-weather-wrapper .epw-radar iframe {
        width: 100% !important;
        max-width: 100%;
    }

    .epw-weather-wrapper .epw-radar .center {
        width: 100% !important;
    }
}

/* ============================================
   TRENDS / DAILY STATISTICS SECTION
   ============================================ */

.epw-weather-wrapper .epw-wxtrends {
    font-size: 0.92em !important;
    width: 100%;
}

.epw-weather-wrapper .epw-wxtrends #main-copy {
    width: 100% !important;
    max-width: 100%;
}

.epw-weather-wrapper .epw-wxtrends h1 {
    font-size: 1.4em !important;
    color: #333;
    margin: 15px 0 10px;
}

.epw-weather-wrapper .epw-wxtrends h2 {
    font-size: 1.3em !important;
    color: #333;
    margin: 10px 0;
}

.epw-weather-wrapper .epw-wxtrends table {
    width: 100% !important;
    border-collapse: collapse;
}

.epw-weather-wrapper .epw-wxtrends .table-top {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 0.92em !important;
    font-weight: bold;
    color: #FFFFFF;
    background-color: #212757;
    text-align: center;
}

.epw-weather-wrapper .epw-wxtrends .table-top td {
    padding: 4px 6px;
    border: 1px solid #ccc;
}

.epw-weather-wrapper .epw-wxtrends .column-light {
    color: black;
    background-color: white;
}

.epw-weather-wrapper .epw-wxtrends .column-light td {
    padding: 4px 6px;
    border: 1px solid #eee;
}

.epw-weather-wrapper .epw-wxtrends .column-dark {
    color: #006;
    background-color: #E8E8E8;
}

.epw-weather-wrapper .epw-wxtrends .column-dark td {
    padding: 4px 6px;
    border: 1px solid #ddd;
}

.epw-weather-wrapper .epw-wxtrends img[src*="dirplot"] {
    max-width: 100%;
    height: auto;
}

/* Responsive trends tables */
@media screen and (max-width: 768px) {
    .epw-weather-wrapper .epw-wxtrends table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .epw-weather-wrapper .epw-wxtrends img[src*="dirplot"] {
        max-width: 300px;
    }
}

/* ============================================
   WEATHER HISTORY SECTION
   ============================================ */

.epw-weather-wrapper .epw-wxhistory {
    font-size: 0.92em !important;
    width: 100%;
}

.epw-weather-wrapper .epw-wxhistory #main-copy {
    width: 100% !important;
    max-width: 100%;
}

.epw-weather-wrapper .epw-wxhistory h1,
.epw-weather-wrapper .epw-wxhistory h3 {
    font-size: 1.3em !important;
    color: #333;
    margin: 15px 0 10px;
}

.epw-weather-wrapper .epw-wxhistory fieldset {
    border: 1px solid #ccc !important;
    outline: none !important;
    padding: 10px 15px;
    margin: 10px 0;
}

.epw-weather-wrapper .epw-wxhistory legend {
    font-weight: bold;
    padding: 0 5px;
}

.epw-weather-wrapper .epw-wxhistory select {
    padding: 4px 8px;
    margin-right: 5px;
}

.epw-weather-wrapper .epw-wxhistory input[type="submit"] {
    padding: 4px 12px;
    cursor: pointer;
}

.epw-weather-wrapper .epw-wxhistory table {
    width: 100% !important;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.epw-weather-wrapper .epw-wxhistory .table-top {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 0.92em !important;
    font-weight: bold;
    color: #FFFFFF;
    background-color: #212757;
    text-align: center;
}

.epw-weather-wrapper .epw-wxhistory .table-top td {
    padding: 4px 6px;
    border: 1px solid #ccc;
}

.epw-weather-wrapper .epw-wxhistory .column-light {
    color: black;
    background-color: white;
}

.epw-weather-wrapper .epw-wxhistory .column-light td {
    padding: 4px 6px;
    border: 1px solid #eee;
}

.epw-weather-wrapper .epw-wxhistory .column-dark {
    color: #006;
    background-color: #E8E8E8;
}

.epw-weather-wrapper .epw-wxhistory .column-dark td {
    padding: 4px 6px;
    border: 1px solid #ddd;
}

@media screen and (max-width: 768px) {
    .epw-weather-wrapper .epw-wxhistory table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================
   NOAA REPORTS SECTION
   ============================================ */

.epw-weather-wrapper .epw-noaa-reports {
    font-size: 0.92em !important;
    width: 100%;
}

.epw-weather-wrapper .epw-noaa-reports #content {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
}

.epw-weather-wrapper .epw-noaa-reports h1 {
    font-size: 1.4em !important;
    color: #333;
    margin: 10px 0;
}

.epw-weather-wrapper .epw-noaa-reports h2 {
    font-size: 1.2em !important;
    color: #333;
    margin: 10px 0;
}

.epw-weather-wrapper .epw-noaa-reports .relatedLinks {
    font-size: 0.92em !important;
    margin: 5px 0 10px;
}

.epw-weather-wrapper .epw-noaa-reports .column-dark {
    color: #006;
    background-color: #E8E8E8;
    padding: 8px 12px;
    margin: 10px 0;
}

.epw-weather-wrapper .epw-noaa-reports pre {
    font-size: 9pt !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-x: auto;
    background-color: #f9f9f9;
    padding: 10px;
    border: 1px solid #ddd;
    line-height: 1.4;
}

.epw-weather-wrapper .epw-noaa-reports .story {
    margin: 0;
    padding: 0;
}

.epw-weather-wrapper .epw-noaa-reports table {
    width: 100% !important;
}

@media screen and (max-width: 768px) {
    .epw-weather-wrapper .epw-noaa-reports pre {
        font-size: 7pt !important;
        padding: 5px;
    }
}

/* ============================================
   ALMANAC SECTION
   ============================================ */

.epw-weather-wrapper .epw-almanac {
    font-size: 0.92em !important;
    width: 100%;
}

.epw-weather-wrapper .epw-almanac #content {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
}

.epw-weather-wrapper .epw-almanac h1 {
    font-size: 1.4em !important;
    color: #333;
    margin: 10px 0;
}

.epw-weather-wrapper .epw-almanac .relatedLinks {
    font-size: 0.92em !important;
    margin: 5px 0 10px;
}

.epw-weather-wrapper .epw-almanac .story {
    margin: 0 0 10px;
    padding: 0;
}

.epw-weather-wrapper .epw-almanac img {
    max-width: 100%;
    height: auto;
}


/* ============================================
   NWS FORECAST - HARD CONTAINMENT AT ALL WIDTHS (v2.1.6)
   The forecast section is bounded to its column on every screen size.
   The detail-text table wraps (table-layout:fixed); the icon strip and,
   as a final safety net, the whole .NOAA block scroll horizontally rather
   than overflowing the page.
   ============================================ */

.epw-weather-wrapper .epw-nws-forecast,
.epw-weather-wrapper .epw-nws-forecast .story,
.epw-weather-wrapper .epw-nws-forecast .NOAA {
    max-width: 100% !important;
    box-sizing: border-box;
}

.epw-weather-wrapper .epw-nws-forecast .NOAA {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.epw-weather-wrapper .epw-nws-forecast table[width="635"],
.epw-weather-wrapper .epw-nws-forecast table[width="630"] {
    width: 100% !important;
    max-width: 100% !important;
}

.epw-weather-wrapper .epw-nws-forecast table[width="630"] {
    table-layout: fixed !important;
}

.epw-weather-wrapper .epw-nws-forecast table[width="630"] td {
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.epw-weather-wrapper .epw-nws-iconscroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   NWS FORECAST ICON ROW - HORIZONTAL SCROLL (tablet & mobile)
   ============================================ */

@media screen and (max-width: 1024px) {
    .epw-weather-wrapper .epw-nws-iconscroll {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    .epw-weather-wrapper .epw-nws-iconscroll > table {
        min-width: 720px !important;
        width: 720px !important;
    }
    .epw-weather-wrapper .epw-nws-iconscroll td {
        min-width: 78px;
    }
}
