/* mobile-menu.css — off-canvas drawer triggered by the hamburger on mobile. */

/* ---------- Hamburger button ----------
   Minimal, no background. Three gray lines, varied widths.
   On click: springy scale-bounce. On open: lines morph to X and go orange. */

.mobile-menu-icon {
    width: 44px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    transition:
        background .18s ease,
        transform .32s cubic-bezier(.34, 1.56, .64, 1);
}
.mobile-menu-icon:hover   { background: rgba(0, 0, 0, 0.04); }
.mobile-menu-icon:hover .mmenu-burger span { width: 100%; }
.mobile-menu-icon:active  { transform: scale(0.85); transition-duration: .08s; }

.mmenu-burger {
    width: 20px;
    height: 14px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
}
.mmenu-burger span {
    display: block;
    height: 2px;
    background: #5a5a65;
    border-radius: 2px;
    transform-origin: center;
    transition:
        width .32s cubic-bezier(.22,1,.36,1),
        transform .4s cubic-bezier(.68,-0.2,.26,1.4),
        opacity .22s ease,
        background .22s ease;
}
.mmenu-burger span:nth-child(1) { width: 100%; transition-delay: .05s; }
.mmenu-burger span:nth-child(2) { width: 60%;  transition-delay: 0s;  }
.mmenu-burger span:nth-child(3) { width: 78%;  transition-delay: .1s; }

/* Open state: lines morph to X, colored orange. No filled background. */
.mobile-menu-icon[aria-expanded="true"] {
    background: transparent;
}
.mobile-menu-icon[aria-expanded="true"] .mmenu-burger span {
    width: 100% !important;
    background: #E9540E;
}
.mobile-menu-icon[aria-expanded="true"] .mmenu-burger span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
    transition-delay: .08s;
}
.mobile-menu-icon[aria-expanded="true"] .mmenu-burger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
    transition-delay: 0s;
}
.mobile-menu-icon[aria-expanded="true"] .mmenu-burger span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    transition-delay: .08s;
}

/* ---------- Drawer ---------- */

.mmenu {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: block;
    pointer-events: none;
}
.mmenu[hidden] { display: none; }
.mmenu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 20, 0.32);
    -webkit-backdrop-filter: blur(3px);
            backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .24s ease;
    pointer-events: auto;
}
.mmenu-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(88vw, 360px);
    overflow: hidden;
    color: #1D1929;
    font-family: "Lato","Inter","Helvetica Neue",sans-serif;
    background:
        radial-gradient(circle at 100% 0%, rgba(239,125,0,0.08) 0%, rgba(239,125,0,0) 55%),
        radial-gradient(circle at -20% 55%, rgba(250,163,28,0.06) 0%, rgba(250,163,28,0) 55%),
        #ffffff;
    box-shadow: -24px 0 50px rgba(10, 8, 20, 0.18);
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.22,1,.36,1);
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    padding-bottom: env(safe-area-inset-bottom);
    will-change: transform;
}
/* Glowing left-edge signature */
.mmenu-panel::before {
    content: "";
    position: absolute;
    top: 10%;
    bottom: 10%;
    left: 0;
    width: 1px;
    background: linear-gradient(180deg, rgba(239,125,0,0) 0%, rgba(239,125,0,0.5) 25%, rgba(250,163,28,0.5) 75%, rgba(250,163,28,0) 100%);
    pointer-events: none;
}
/* Top-right ambient glow */
.mmenu-glow {
    position: absolute;
    top: -80px;
    right: -80px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(239,125,0,0.18) 0%, rgba(239,125,0,0) 70%);
    filter: blur(8px);
    pointer-events: none;
    z-index: 0;
}
.mmenu.is-open .mmenu-backdrop { opacity: 1; }
.mmenu.is-open .mmenu-panel    { transform: translateX(0); }

/* Head */
.mmenu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 18px 16px;
    position: relative;
    z-index: 2;
}
.mmenu-logo img {
    height: 30px;
    display: block;
}
.mmenu-close {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #ececf0;
    background: #f4f4f7;
    color: #1D1929;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: background .18s ease, transform .18s ease, border-color .18s ease;
}
.mmenu-close:hover  { background: #e9e9ee; border-color: #dcdce2; }
.mmenu-close:active { transform: scale(0.92); }
.mmenu-close svg    { width: 20px; height: 20px; }

/* Always-visible search field */
.mmenu-search {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 16px 10px;
    padding: 0 6px 0 14px;
    height: 44px;
    border-radius: 22px;
    background: #f4f4f7;
    border: 1px solid #ececf0;
    transition: border-color .18s ease, background .18s ease, box-shadow .22s ease;
}
.mmenu-search:focus-within {
    border-color: rgba(233,84,14,0.6);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(239,125,0,0.14);
}
.mmenu-search-icon {
    width: 16px;
    height: 16px;
    color: #8a8898;
    flex: 0 0 auto;
    transition: color .18s ease;
}
.mmenu-search:focus-within .mmenu-search-icon { color: #E9540E; }
.mmenu-search input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1D1929;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}
.mmenu-search input[type="text"]::placeholder { color: #A6A6A6; }
.mmenu-search-submit {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #E9540E 0%, #FAA31C 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(233,84,14,0.35);
    transition: transform .18s cubic-bezier(.22,1,.36,1), box-shadow .22s ease;
}
.mmenu-search-submit:hover  { transform: scale(1.06); box-shadow: 0 6px 16px rgba(233,84,14,0.5); }
.mmenu-search-submit:active { transform: scale(0.94); }
.mmenu-search-submit svg    { width: 16px; height: 16px; }

/* Section label above nav */
.mmenu-section {
    padding: 18px 22px 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #8a8898;
    position: relative;
    z-index: 2;
}

/* Nav links */
.mmenu-links {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 2px 12px 14px;
    overflow-y: auto;
    position: relative;
    z-index: 2;
}
.mmenu-link {
    position: relative;
    display: flex;
    align-items: center;
    padding: 13px 40px 13px 20px;
    margin: 2px 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #3f3a4c;
    text-decoration: none;
    overflow: hidden;
    transition:
        background .22s ease,
        color .18s ease,
        padding-left .3s cubic-bezier(.22,1,.36,1);
}
.mmenu-link::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 8px;
    width: 0;
    height: 20px;
    border-radius: 3px;
    background: linear-gradient(180deg, #E9540E 0%, #FAA31C 100%);
    transform: translateY(-50%);
    transition: width .25s cubic-bezier(.22,1,.36,1);
}
.mmenu-link::after {
    content: "›";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #c8c7ce;
    font-size: 22px;
    line-height: 1;
    transition: color .2s ease, right .25s cubic-bezier(.22,1,.36,1);
}
.mmenu-link:hover {
    background: linear-gradient(90deg, rgba(233,84,14,0.1) 0%, rgba(250,163,28,0.02) 100%);
    color: #1D1929;
    padding-left: 28px;
}
.mmenu-link:hover::before { width: 3px; }
.mmenu-link:hover::after  { color: #E9540E; right: 14px; }
.mmenu-link.is-active {
    background: linear-gradient(90deg, rgba(233,84,14,0.14) 0%, rgba(250,163,28,0.03) 100%);
    color: #1D1929;
    padding-left: 28px;
}
.mmenu-link.is-active::before { width: 3px; }
.mmenu-link.is-active::after  { color: #E9540E; }

/* Footer — socials + brand line */
.mmenu-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 18px 18px 14px;
    border-top: 1px solid #ececf0;
    position: relative;
    z-index: 2;
}
.mmenu-soc {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f4f4f7;
    border: 1px solid #ececf0;
    color: #3f3a4c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(18, 14, 30, 0.04);
    transition:
        background .22s ease,
        color .22s ease,
        border-color .22s ease,
        transform .22s cubic-bezier(.22,1,.36,1),
        box-shadow .22s ease;
}
.mmenu-soc:hover {
    background: linear-gradient(135deg, #E9540E 0%, #FAA31C 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(233, 84, 14, 0.3);
}
.mmenu-soc:active { transform: translateY(0) scale(0.95); }
.mmenu-soc svg    { display: block; }

.mmenu-brand {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #A6A6A6;
    padding: 0 16px 18px;
    z-index: 2;
    position: relative;
}

/* Shared body scroll lock — refcounted via njoyLockScroll/njoyUnlockScroll
   in functions.js so overlays (mobile menu, search sheet, etc.) coexist
   without stomping each other's state. */
body.scroll-locked {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
}

/* Mobile header play button — circular vinyl-style disc that shows the
   now-playing cover (the same .njp-cover-img the desktop header uses;
   functions.js already updates every instance). Spins while playing,
   with a tiny play/pause badge overlay. */
.mh-play {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #F5F5F7;
    color: #1D1929;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08), inset 0 0 0 1px #E6E6EA;
    transition: box-shadow .18s ease, transform .18s ease;
    overflow: visible;
}
.mh-play:hover  { box-shadow: 0 3px 10px rgba(233,84,14,0.22), inset 0 0 0 1px #F8B88A; }
.mh-play:active { transform: scale(0.94); }

.mh-play-cover {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    display: block;
    position: relative;
}
.mh-play-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    transition: filter .2s ease;
}
.mh-play-cover:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: radial-gradient(circle, #41AB52 40%, #5CC36D 100%);
    box-shadow: 0 0 5px rgba(65, 171, 82, 0.55);
    opacity: 0;
    transform: scale(0.4);
    transition: opacity .5s ease, transform .5s ease;
    z-index: 2;
    pointer-events: none;
}
.njp-state-playing .mh-play-cover:after,
.njp-state-loading .mh-play-cover:after,
.njp-state-reconnecting .mh-play-cover:after {
    opacity: 1;
    transform: scale(1);
}

/* Little badge bottom-right with the play/pause glyph */
.mh-play-badge {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1D1929;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transition: background .18s ease;
}
.mh-play-badge svg {
    position: absolute;
    width: 10px;
    height: 10px;
    transition: opacity .18s ease, transform .18s ease;
}
.mh-play-glyph  { opacity: 1; transform: translateX(0.5px); }
.mh-pause-glyph { opacity: 0; transform: scale(.82); }

/* Playing / loading / reconnecting — vinyl spins, pause glyph shows,
   badge turns orange. */
.njp-state-playing .mh-play,
.njp-state-loading .mh-play,
.njp-state-reconnecting .mh-play {
    box-shadow: 0 4px 16px rgba(233, 84, 14, 0.4), inset 0 0 0 1px rgba(233, 84, 14, 0.5);
}
.njp-state-playing .mh-play-cover img,
.njp-state-loading .mh-play-cover img,
.njp-state-reconnecting .mh-play-cover img {
    animation: mh-vinyl-spin 6s linear infinite;
    filter: drop-shadow(0 0 4px rgba(233, 84, 14, 0.25));
}
.njp-state-playing .mh-play-badge,
.njp-state-loading .mh-play-badge,
.njp-state-reconnecting .mh-play-badge {
    background: linear-gradient(135deg, #E9540E 0%, #FAA31C 100%);
}
.njp-state-playing .mh-play-glyph,
.njp-state-loading .mh-play-glyph,
.njp-state-reconnecting .mh-play-glyph { opacity: 0; transform: scale(.82); }
.njp-state-playing .mh-pause-glyph,
.njp-state-loading .mh-pause-glyph,
.njp-state-reconnecting .mh-pause-glyph { opacity: 1; transform: scale(1); }

.njp-state-loading .mh-play,
.njp-state-reconnecting .mh-play { animation: mh-play-breathe 1.4s ease-in-out infinite; }

@keyframes mh-vinyl-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes mh-play-breathe {
    0%, 100% { box-shadow: 0 4px 16px rgba(233, 84, 14, 0.35), inset 0 0 0 1px rgba(233, 84, 14, 0.5); }
    50%      { box-shadow: 0 4px 22px rgba(233, 84, 14, 0.6),  inset 0 0 0 1px rgba(233, 84, 14, 0.5); }
}
