/* =========================================================================
   Wethr.net — Navigation Overrides
   Load this file AFTER style.css in your <head>.
   ========================================================================= */

/* ------------------------------------------------------------------
   1. DARK DROPDOWN THEME
   Override UIkit's white dropdown for dark palette.
   ------------------------------------------------------------------ */
.uk-navbar-dropdown,
.wethr-mega-dropdown,
.wethr-sub-dropdown {
    background: #1a1a1e !important;
    color: #d0d0d0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
    border-radius: 10px;
}

/* Dropdown nav item colours */
.uk-navbar-dropdown-nav > li > a {
    color: #b0b0b0 !important;
    transition: color 0.15s, background 0.15s;
    border-radius: 4px;
    padding: 5px 8px !important;
}

.uk-navbar-dropdown-nav > li > a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.uk-navbar-dropdown-nav > li.uk-active > a {
    color: #FC5B3F !important;
}

/* Dropdown divider */
.uk-navbar-dropdown-nav .uk-nav-divider {
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* Dropdown header */
.uk-navbar-dropdown-nav .uk-nav-header {
    color: #ffffff;
}

/* Grid column divider (dark) */
.uk-navbar-dropdown-grid > :not(.uk-first-column)::before {
    border-left-color: rgba(255, 255, 255, 0.08);
}


/* ------------------------------------------------------------------
   2. MEGA DROPDOWN — Temperature Markets (Desktop)
   Uses pos: bottom-justify + stretch: x so UIkit handles containment.
   Content is centered inside with max-width.
   ------------------------------------------------------------------ */
.wethr-mega-dropdown {
    /* UIkit navbar handles positioning — just set width */
    width: 880px !important;
    max-width: calc(100vw - 30px) !important;
    padding: 0 !important;
    overflow: hidden;
}

/* Inner wrapper constrains content and centers it */
.wethr-markets-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 24px;
}

.wethr-markets-grid {
    display: flex;
    gap: 24px;
}

/* American group takes the lion's share */
.wethr-market-group {
    flex: 1 1 auto;
    min-width: 0; /* prevent flex overflow */
}

/* International group on the right */
.wethr-intl-group {
    flex: 0 0 190px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding-left: 20px;
}

/* Group heading */
.wethr-group-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #FC5B3F;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(252, 91, 63, 0.25);
}

/* 3-column layout for American markets */
.wethr-market-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 16px;
}

/* Market list items */
.wethr-market-list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.wethr-market-list > li > a {
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-size: 12.5px !important;
    padding: 4px 6px !important;
    line-height: 1.4;
    white-space: nowrap;
}

/* Station code badge */
.wethr-station-code {
    display: inline-block;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 10px;
    font-weight: 600;
    color: #8ab4f8;
    background: rgba(138, 180, 248, 0.1);
    padding: 1px 5px;
    border-radius: 3px;
    min-width: 36px;
    text-align: center;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}


/* ------------------------------------------------------------------
   3. STANDARD SUB-DROPDOWNS (Tools, Education, Account)
   ------------------------------------------------------------------ */
.wethr-sub-dropdown {
    width: 240px !important;
    padding: 12px 14px !important;
}

.wethr-sub-dropdown .uk-navbar-dropdown-nav > li > a {
    font-size: 13px !important;
    padding: 6px 8px !important;
}


/* ------------------------------------------------------------------
   4. SIGN IN / REGISTER BUTTONS (logged-out desktop)
   ------------------------------------------------------------------ */
.wethr-signin-btn {
    font-size: 13px;
    font-weight: 500;
    color: #ccc !important;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    transition: color 0.15s, border-color 0.15s;
    text-decoration: none !important;
    margin-right: 8px;
}

.wethr-signin-btn:hover {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.4);
}

.wethr-register-btn {
    font-size: 13px;
    font-weight: 600;
    color: #fff !important;
    background: #FC5B3F;
    padding: 6px 16px;
    border-radius: 6px;
    transition: background 0.15s;
    text-decoration: none !important;
}

.wethr-register-btn:hover {
    background: #e04a30;
    color: #fff !important;
}

/* Account icon toggle (logged-in desktop) */
.wethr-account-toggle {
    font-size: 22px !important;
    color: #ccc !important;
    padding: 0 8px;
    transition: color 0.15s;
}

.wethr-account-toggle:hover {
    color: #fff !important;
    text-decoration: none !important;
}


/* ------------------------------------------------------------------
   5. MOBILE OFF-CANVAS NAV
   ------------------------------------------------------------------ */

/* ---- Z-index: must beat dashboard icons (z-index 9000+) ---- */
#wethr-mobile-nav.uk-offcanvas {
    z-index: 10100 !important;
}

/* ---- Hide any legacy/theme-auto-generated hamburger ---- */
.uk-navbar-toggle.uk-hidden\@m:not(.wethr-hamburger) {
    display: none !important;
}

/* Hide legacy full-screen mobile nav (in-mobile-nav + #modal-full) */
.in-mobile-nav {
    display: none !important;
}

#modal-full {
    display: none !important;
}

/* ---- Offcanvas bar styling ---- */
.wethr-offcanvas-bar {
    background: #111114 !important;
    padding: 24px 20px !important;
    width: 100% !important;
    max-width: 380px;
    /* Push content below the sticky header */
    padding-top: 80px !important;
}

@media (min-width: 640px) {
    .wethr-offcanvas-bar {
        width: 380px !important;
    }
}

.wethr-mobile-logo {
    margin-bottom: 24px;
}

/* ---- Override global .uk-nav-default styles from style.css ---- */
/* style.css sets .uk-nav-default { margin-top: -40px } and huge font sizes */
.wethr-mobile-nav-list.uk-nav-default {
    margin-top: 0 !important;
}

.wethr-mobile-nav-list.uk-nav-default > li > a {
    font-size: 15px !important;
    color: #e0e0e0;
    font-weight: 600;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wethr-mobile-nav-list.uk-nav-default > li > a:hover {
    color: #ffffff;
}

/* Sub-nav items */
.wethr-mobile-nav-list .uk-nav-sub > li > a {
    font-size: 13.5px !important;
    color: #aaa;
    padding: 6px 0;
}

.wethr-mobile-nav-list .uk-nav-sub > li > a:hover {
    color: #fff;
}

/* ---- Expand/collapse hint chevron (Font Awesome) ---- */
.wethr-expand-hint {
    float: right;
    font-size: 10px;
    color: #666;
    transition: transform 0.2s ease, color 0.2s ease;
    margin-top: 4px;
}

/* Rotate when parent is open */
.uk-parent.uk-open > a .wethr-expand-hint {
    transform: rotate(180deg);
    color: #FC5B3F;
}

/* Group labels inside mobile markets */
.wethr-mobile-group-label {
    font-size: 10px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #FC5B3F !important;
    padding: 12px 0 4px 0 !important;
    border-bottom: 1px solid rgba(252, 91, 63, 0.2);
    margin-bottom: 6px;
    list-style: none;
}

.wethr-mobile-group-label:first-child {
    padding-top: 4px !important;
}

/* 2-column grid for mobile markets */
.wethr-mobile-market-grid {
    list-style: none !important;
    padding: 0 !important;
}

.wethr-mobile-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 8px;
}

.wethr-mobile-2col > a {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #b0b0b0;
    font-size: 12.5px;
    padding: 5px 4px;
    border-radius: 4px;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wethr-mobile-2col > a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* Station code badge (mobile) */
.wethr-mobile-2col .wethr-station-code {
    font-size: 9px;
    padding: 1px 4px;
    min-width: 32px;
}

/* Divider */
.wethr-offcanvas-bar .uk-nav-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 12px 0;
}

/* Sign in / register in mobile */
.wethr-mobile-signin {
    color: #e0e0e0 !important;
}

.wethr-mobile-signin i {
    margin-right: 6px;
}

/* UIkit offcanvas close button */
.wethr-offcanvas-bar .uk-offcanvas-close {
    color: #999;
    top: 80px; /* Align below header */
    right: 16px;
    z-index: 1;
}

.wethr-offcanvas-bar .uk-offcanvas-close:hover {
    color: #fff;
}

/* UIkit nav parent icon colour override */
.wethr-offcanvas-bar .uk-nav-parent-icon > .uk-parent > a::after {
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline fill='none' stroke='%23999' stroke-width='1.1' points='10 1 4 7 10 13'/%3E%3C/svg%3E");
}


/* ------------------------------------------------------------------
   6. NAVBAR POLISH (both viewports)
   ------------------------------------------------------------------ */

/* Slightly tighter nav items */
.uk-navbar-nav > li > a {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Softer hover */
.uk-navbar-nav > li:hover > a,
.uk-navbar-nav > li > a[aria-expanded=true] {
    color: #ffffff;
}

/* Active accent bar */
.uk-navbar-nav > li.uk-active > a {
    color: #FC5B3F;
}

/* Our hamburger icon colour */
.wethr-hamburger {
    color: #ccc;
}

.wethr-hamburger:hover {
    color: #fff;
}

/* Sticky navbar — ensure dark bg persists */
.uk-sticky.uk-active.uk-navbar-container {
    background: rgba(22, 22, 26, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
