/* Shared Dashboard Navigation Styles
   Killington Ski Area GIS Viewer
   Author: Phillip Sweeney - phillipjsweeney@gmail.com
   Date: 2026-08-27 */

app-sidebar {
    display: block;
    height: 100%;
    flex-shrink: 0;
}
#sidebar {
    width: 235px;
    height: 100%;
    background-color: #000000;
    border-right: 1px solid #30363d;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    z-index: 20;
    overflow-y: auto;
}
#sidebar .nav-title {
    margin: 0 0 15px 0;
    padding: 0 20px;
    font-size: 11px;
    font-weight: 700;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 1px;
}
#sidebar a {
    display: flex !important;
    align-items: center !important;
    padding: 10px 16px;
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    font-size: 13px;
    border-left: 3px solid transparent;
    transition: background 0.15s ease;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
}
#sidebar a svg {
    display: inline-block !important;
    flex-shrink: 0 !important;
}
#sidebar a:hover {
    background-color: #161b22;
    color: #ffffff;
}
#sidebar a.active {
    background-color: #161b22;
    color: #ffffff;
    border-left-color: #ffffff;
}
#sidebar a.logo-link {
    display: block !important;
    padding: 0 !important;
    border-left: none !important;
    background: transparent !important;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
#sidebar a.logo-link:hover {
    background: transparent !important;
    opacity: 0.9;
    transform: scale(0.99);
}
#mobile-menu-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
#mobile-menu-btn:hover {
    background: #161b22;
}
@media (max-width: 768px) {
    app-sidebar {
        position: fixed;
        left: 0; top: 0;
        height: 100vh; width: 250px;
        z-index: 2000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    app-sidebar.mobile-open {
        transform: translateX(0) !important;
    }
    #sidebar {
        width: 100% !important;
        box-shadow: 5px 0 15px rgba(0,0,0,0.8);
    }
    #mobile-top-nav {
        display: flex !important;
        position: fixed; top: 0; left: 0;
        width: 100%; height: 50px;
        background: #000000;
        border-bottom: 1px solid #30363d;
        z-index: 1000;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        padding: 0 14px;
    }
}
#mobile-top-nav {
    display: none;
}

/* ===== 2026-11-16 (Claude): section gaps, LIVE MOUNTAIN, sponsor block, news ticker, SELECTED chip, phone drawer ===== */
#sidebar .nav-title-gap { margin-top: 18px; }
#sidebar .sidebar-bottom {
    margin-top: auto;
    padding: 20px 20px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    border-top: 1px solid #30363d;
}
#sidebar .nav-link:last-of-type { margin-bottom: 20px; }
#sidebar .sponsor-logo { width: 100%; display: flex; justify-content: center; overflow: hidden; }
#sidebar .sponsor-logo img { width: 100%; max-height: 120px; object-fit: contain; }

/* LIVE MOUNTAIN: latest daily webcam picture, links to Killington's own webcams; Killington logo below */
#sidebar .live-mountain { width: 100%; display: flex; flex-direction: column; gap: 8px; }
#sidebar .live-mountain .nav-title { padding: 0; margin: 0 0 2px; color: #ffffff; }
#sidebar .live-mountain .nav-title::before {
    content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    background: #ff1493; margin-right: 7px; vertical-align: 1px;
}
#sidebar .live-mountain a {
    display: block !important;
    padding: 0;
    border-left: none;
    white-space: normal !important;
    border-radius: 6px;
}
#sidebar .live-mountain a:hover { background: transparent; opacity: 0.88; }
#sidebar .live-link img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border: 1px solid #30363d; border-radius: 6px; background: #161b22; }
#sidebar .live-link img[hidden] { display: none; }
#sidebar #live-mountain-caption { display: block; margin-top: 5px; font-size: 11px; font-weight: 600; color: #8b949e; text-align: center; }
#sidebar .live-link:hover #live-mountain-caption { color: #58a6ff; }
#sidebar .live-history { text-align: center; font-size: 12px; font-weight: 600; color: #58a6ff; margin-top: -4px; }
#sidebar .live-history:hover { text-decoration: underline; opacity: 1; }
#sidebar .live-logo { background: #ffffff !important; padding: 5px 12px !important; }
#sidebar .live-logo img { display: block; width: 100%; max-height: 40px; object-fit: contain; }

/* News ticker */
#news-ticker {
    display: flex; align-items: stretch; flex-shrink: 0; height: 30px; min-width: 0;
    background: #0a0a0a; border-bottom: 1px solid #30363d; font-size: 12.5px; overflow: hidden;
}
#news-ticker .tk-label {
    display: flex; align-items: center; padding: 0 12px; background: #ff1493; color: #ffffff;
    font-weight: 700; font-size: 11px; letter-spacing: 1px; text-decoration: none; flex-shrink: 0;
}
#news-ticker .tk-track { flex: 1 1 auto; min-width: 0; overflow: hidden; display: flex; align-items: center; }
#news-ticker .tk-move { display: inline-flex; align-items: center; white-space: nowrap; animation: tk-scroll 60s linear infinite; }
#news-ticker:hover .tk-move, #news-ticker:focus-within .tk-move { animation-play-state: paused; }
#news-ticker .tk-move a { color: #e6edf3; text-decoration: none; }
#news-ticker .tk-move a:hover { color: #58a6ff; text-decoration: underline; }
#news-ticker .tk-src { color: #8b949e; font-size: 11px; margin-left: 4px; }
#news-ticker .tk-dot { color: #ff1493; margin: 0 14px; }
@keyframes tk-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* The ticker always scrolls (Phillip 2026-11-16: "i want news to be scrolling"), also where the system asks for less
   motion. It pauses while the pointer is over it or a headline has the keyboard focus. */

/* SELECTED chip: in the page header on large screens, floating under the top bar on a phone */
.selected-chip, #selected-chip {
    display: inline-block; margin-left: 12px; padding: 2px 8px; border: 1px solid #30363d; border-radius: 10px;
    background: #161b22; color: #c9d1d9; font-size: 10.5px; font-weight: 600; letter-spacing: 0.4px;
    white-space: nowrap; vertical-align: middle;
}
#selected-chip { display: none; }
#nav-backdrop { display: none; }

@media (max-width: 768px) {
    #mobile-top-nav #news-ticker { flex: 1 1 auto; height: 34px; border: 1px solid #30363d; border-radius: 4px; }
    #mobile-top-nav #news-ticker .tk-label { padding: 0 8px; }
    #mobile-top-nav { padding-right: 8px !important; }
    .selected-chip { display: none; }
    #selected-chip {
        display: block; position: fixed; top: 56px; right: 8px; margin: 0; z-index: 1400;
        background: rgba(0, 0, 0, 0.78); max-width: 70vw; overflow: hidden; text-overflow: ellipsis;
    }
    #nav-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 1500; }
}

/* Common footer (2026-11-16): on the map pages a slim line at the bottom; on content pages the page's own footer */
#site-footer.slim {
    flex-shrink: 0; display: flex; align-items: center; height: 26px; padding: 0 14px; overflow: hidden; white-space: nowrap;
    background: #000000; border-top: 1px solid #30363d; color: #8b949e; font-size: 11.5px; z-index: 10;
}
#site-footer .foot-people a { color: #58a6ff; text-decoration: none; }
#site-footer .foot-people a:hover { text-decoration: underline; }
@media (max-width: 768px) { #site-footer.slim { height: auto; min-height: 24px; white-space: normal; padding: 3px 10px; font-size: 10.5px; } }

/* FIS logo (2026-11-20): small, on a white tile like the Killington logo, links to fis-ski.com */
#sidebar a.sponsor-logo.fis-logo { width: 62%; margin: 0 auto; background: #ffffff; border-radius: 6px; padding: 6px 8px; box-sizing: border-box; }
#sidebar a.sponsor-logo.fis-logo img { max-height: 54px; }

/* Shop logos (2026-11-20): Peak Performance (white tile), Fuxi Racing (own dark artwork); open in a new tab */
#sidebar a.sponsor-logo.shop-logo { width: 86%; margin: 0 auto; background: #ffffff; border-radius: 6px; padding: 4px 6px; box-sizing: border-box; }
#sidebar a.sponsor-logo.shop-logo.dark { background: #000000; padding: 0; }
#sidebar a.sponsor-logo.shop-logo img { max-height: 70px; }

/* Current weather card under Live Mountain (2026-11-20): black on white */
#sidebar a.wx-now-card { display: block; margin: 8px 0 4px; padding: 8px 12px !important; box-sizing: border-box; background: #ffffff; color: #000000; border-radius: 6px; text-decoration: none; font-size: 11.5px; line-height: 1.35; }
#sidebar .wx-now-card[hidden] { display: none; }
#sidebar .wx-now-card .wn-h { font-weight: 700; font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase; }
#sidebar .wx-now-card .wn-sky { color: #444444; margin-bottom: 3px; }
#sidebar .wx-now-card .wn-row { display: grid; grid-template-columns: 34px 44px 1fr; gap: 4px; align-items: baseline; color: #000000; }
#sidebar .wx-now-card .wn-row b { font-size: 14px; }
#sidebar .wx-now-card .wn-row span:last-child { color: #444444; font-size: 10.5px; }
#sidebar .wx-now-card .wn-f { margin-top: 3px; text-align: right; font-size: 10.5px; color: #000000; text-decoration: underline; }

/* 2026-11-20: site name beside the SELECTED chip (white); print-order line + Subscribe in the footer */
#nav-header .header-brand { margin-left: 12px; color: #ffffff; font-weight: 600; font-size: 13px; letter-spacing: .4px; white-space: nowrap; }
#nav-header .header-brand .hb-short { display: none; }
/* 2026-11-20: long name on big screens; short name on phones (the floating SELECTED chip stays on the right) */
@media (max-width: 1100px) { #nav-header .header-brand { overflow: hidden; text-overflow: ellipsis; max-width: 42vw; } }
@media (max-width: 760px) {
    #nav-header .header-brand { margin-left: 8px; font-size: 12px; max-width: 46vw; }
    #nav-header .header-brand .hb-long { display: none; }
    #nav-header .header-brand .hb-short { display: inline; }
}
#site-footer .foot-order { display: block; width: 100%; margin-top: 4px; color: #ffffff; }
#site-footer .foot-order a { color: #58a6ff; }

/* Miniature country flags before .nat codes (nav.js, 2026-11-20) */
.nat img.flag { width: 16px; height: 12px; object-fit: cover; vertical-align: -1px; margin-right: 4px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }

/* Burke Mountain tile with SKI PATROL under the logo (2026-11-20) */
#sidebar .burke-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
#sidebar a.burke-patrol { color: #ffffff; font-weight: 800; font-size: 12px; letter-spacing: 2.5px; text-decoration: none; padding: 2px 0; }
#sidebar a.burke-patrol:hover { text-decoration: underline; }
#site-footer.slim { flex-wrap: wrap; }
#site-footer .foot-order { flex: 1 1 100%; }
/* Mountain Times round logo (2026-11-20) */
#sidebar a.sponsor-logo.mt-logo img { width: 92px; height: 92px; max-height: none; }
