/*
 * V2 side menu (header.php #menu), shared by every V2 page: listing (html.lpv2), individual job board page (html.jbv2),
 * job category pages, /jobs and job pages (html.jcv2). Those pages add class "menuv2" to <html> and load this file + js/menu-v2.js.
 */

.menuv2 {
    --menu-border: #e2e8f0;
    --menu-brand: #42b983;
    --menu-brand-100: #dcf2e7;
    --menu-brand-50: #effaf4;
    --menu-brand-600: #2f9a6b;
    --menu-brand-700: #23794f;
    --menu-ink: #0f172a;
    --menu-muted: #64748b;
    --menu-soft: #f8fafc;
    --menu-subtle: #94a3b8;
    --menu-text: #334155;
}

/* ───────────── Side menu (header.php #menu, opened by the burger) ─────────────
 * header.php keeps its markup and open / close script (.is-active on #menu, .overlay, #burger); the section
 * lists carry hook classes (menu-main, menu-chips, menu-collapsible, menu-social, menu-other) unused by V1.
 * js/menu-v2.js adds: keyboard burger, Escape, page scroll lock (html.menu-open), counts, "Show all".
 * header.php's own <style> is in the body (after this file): every rule here needs .menuv2 in front to win.
 */
.menuv2 .menu {
    box-sizing: border-box;
    width: min(400px, 92vw);
    height: calc(100% - 60px);
    padding: 10px 12px 28px;
    border-right: 1px solid var(--menu-border);
    background: #fff;
    box-shadow: 10px 0 36px rgba(15, 23, 42, .14);
    text-align: left;
    overscroll-behavior: contain;
    transition: left .3s ease;
}

html.menu-open,
html.menu-open body {
    overflow: hidden;
}

.menuv2 .overlay {
    background-color: rgba(15, 23, 42, .45);
}

.menuv2 .burger:focus-visible {
    outline: 2px solid var(--menu-brand);
    outline-offset: 4px;
    border-radius: 6px;
}

/* Lists: one column of rows */
.menuv2 .menu .menu-inner {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    row-gap: 2px;
    max-width: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.menuv2 .menu li.menu-item {
    flex: none;
    list-style: none;
}

.menuv2 .menu .menu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--menu-ink);
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.35;
}

.menuv2 .menu .menu-link:hover,
.menuv2 .menu .menu-link:focus-visible {
    background: var(--menu-brand-50);
    color: var(--menu-brand-700);
    outline: none;
}

.menuv2 .menu .new {
    padding: 1px 7px;
    border-radius: 999px;
    background: #ef4444;
    font-size: 11px;
    font-weight: 700;
}

/* Saved jobs / bookmarked boards counts (js/menu-v2.js) */
.menuv2 .menu .menu-count {
    margin-left: auto;
    min-width: 22px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--menu-brand-100);
    color: var(--menu-brand-700);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.menuv2 .menu .menu-count:empty {
    display: none;
}

/* "Get Hired": full width outlined button */
.menuv2 .menu .menu-link.highlight {
    justify-content: center;
    margin-top: 8px;
    padding: 10px 12px;
    border: 1.5px solid var(--menu-brand);
    color: var(--menu-brand-700);
    font-weight: 700;
}

.menuv2 .menu .menu-link.highlight:hover {
    background: var(--menu-brand);
    color: #fff;
}

/* JobCopilot promo */
.menuv2 .menu .jobcopilot-menu-item {
    margin: 10px 0 0;
    padding: 12px 14px;
    border: 1px solid var(--menu-brand-100);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--menu-brand-50), #fff);
    color: var(--menu-text);
    font-size: 13.5px;
    text-align: left;
}

/* Section titles: small uppercase labels instead of centered pills on a line */
.menuv2 .menu .menu-divider {
    top: 0;
    margin: 16px 0 4px;
    border-top: 1px solid var(--menu-border);
}

.menuv2 .menu .menu-divider-label {
    position: static;
    width: auto;
    padding: 14px 12px 6px;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--menu-subtle);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-align: left;
    text-transform: uppercase;
    transform: none;
}

/* Tags, job pages, social networks: chips */
.menuv2 .menu .menu-chips,
.menuv2 .menu .menu-social {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px 6px;
}

.menuv2 .menu .menu-chips .menu-link,
.menuv2 .menu .menu-social .menu-link {
    padding: 6px 12px;
    border: 1px solid var(--menu-border);
    border-radius: 999px;
    font-size: 13.5px;
}

.menuv2 .menu .menu-chips .menu-link:hover,
.menuv2 .menu .menu-social .menu-link:hover {
    border-color: var(--menu-brand);
}

.menuv2 .menu .menu-social svg.sn {
    position: static;
    width: 16px;
    height: 16px;
    margin: 0;
}

/* 53 job pages: first 12, "Show all" button (js/menu-v2.js) */
.menuv2 .menu .menu-collapsible:not(.is-expanded) > li.menu-item:nth-child(n+13) {
    display: none;
}

.menuv2 .menu .menu-show-all {
    margin: 8px 6px 0;
    padding: 6px 12px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--menu-brand-700);
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
}

.menuv2 .menu .menu-show-all:hover {
    background: var(--menu-brand-50);
}

/* "Submit Your Job Board": primary button, the rest plain rows */
.menuv2 .menu .menu-item.highlightfill .menu-link {
    justify-content: center;
    margin-bottom: 6px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: var(--menu-brand);
    color: #fff;
    font-weight: 700;
}

.menuv2 .menu .menu-item.highlightfill .menu-link:hover {
    background: var(--menu-brand-600);
    color: #fff;
}

/* Marketplace has an inline green background */
.menuv2 .menu .menu-other .menu-link[style] {
    background: var(--menu-brand-50) !important;
}

/* Newsletter (inline padding-bottom:75px compensated the cut off bottom, gone with the fixed height) */
.menuv2 .menu .menu-newsletter {
    margin: 8px 4px 0;
    padding: 16px !important;
    border: 1px solid var(--menu-border);
    border-radius: 14px;
    background: var(--menu-soft);
}

.menuv2 .menu .menu-newsletter .revue-label {
    margin-bottom: 10px;
    color: var(--menu-ink);
}

.menuv2 .menu .menu-newsletter .revue-form-field {
    width: calc(100% - 96px);
    box-sizing: border-box;
}

.menuv2 .menu .menu-newsletter .join-people {
    margin-top: 10px;
    color: var(--menu-muted);
}

@media (prefers-reduced-motion: reduce) {
    .menuv2 .menu {
        transition: none;
    }
}
