/* J1 mobile layout (2026-11-21), loaded after MAC.css, the site theme and mobile.css.
   Below 1000 px: one column (content first, then the sidebars), folding MENU, member bar,
   full-width search with a button, readable text, no sideways scroll at 360 px, tap targets >= 40 px.
   From 1000 px the desktop layout is unchanged. Bump ?v= in MAC.master when this file changes. */

/* ---- All widths ---- */
#logo {                         /* was an <h1>: same box as before */
    margin: 0;
    padding: .4em 15px 0 15px;
    font-size: 2em;
    line-height: 1.1em;
}
#nav-menu > summary { display: none; }
.search-button {
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 110%;
    margin-left: 4px;
    padding: 3px 10px;
    border: 1px solid #555;
    border-radius: 3px;
    background: #e8e8e8;
    color: #000;
    cursor: pointer;
    vertical-align: top;
    height: 27px;
}
.search-button:hover, .search-button:focus { background: #d4d4d4; }
details.fold > summary { list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
#membermenu .sep { padding: 0 2px; }
.col3 details.side-fold > summary h2 { border-top: dotted 1px #aaa; }   /* h2 is now first child of <summary> */
#TopAlbums details.side-fold > summary h2 { border-top: 0; }
img[loading="lazy"][width][height] { height: auto; }
.search-results { font-size: 115%; line-height: 1.6; }
.search-results li { margin: 4px 0; }
.search-country { color: #777; font-size: 90%; }   /* width/height attributes only reserve the space */

/* ---- Desktop: folds always open, not clickable ---- */
@media (min-width: 1000px) {
    details.fold > summary { pointer-events: none; }
}

/* ---- Phones and tablets ---- */
@media (max-width: 999px) {
    html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
    body { font-size: 15px; line-height: 1.45; }
    .siteWidth, #mainSite, #footer-content { min-width: 0; max-width: none; }
    img, iframe, video, embed, object { max-width: 100%; }
    img { height: auto; }

    /* Header: member bar, logo, MENU */
    #header { float: none; }
    #header-background {
        height: auto;
        background-size: auto 64px;
        background-position: left 44px;
    }
    #header #membermenu {
        box-sizing: border-box;
        height: 44px;
        margin: 0;
        padding: 0 12px;
        background: #222;
        line-height: 44px;
        font-size: 15px;
        text-align: right;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    #membermenu a { display: inline-block; padding: 0 6px; }
    #logo { height: 64px; padding: 0 12px; font-size: 1em; }
    #logo a { display: block; height: 64px; width: 220px; max-width: 100%; }
    #nav-menu { clear: both; }
    #nav-menu > summary {
        display: block;
        cursor: pointer;
        padding: 10px 14px;
        min-height: 24px;
        background: #333;
        color: #fff;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: .06em;
    }
    #nav-menu > summary::-webkit-details-marker { display: none; }
    #nav-menu > summary::before { content: "\2630\00a0\00a0"; }
    #nav-menu[open] > summary::before { content: "\2715\00a0\00a0"; }
    #header #nav-menu ul {
        position: static !important;
        margin: 0 !important;
        float: none;
        width: auto;
    }
    #header #nav-menu ul li {
        float: none;
        display: block;
        margin: 0;
        padding: 0;
        text-align: left;
        border-top: 1px solid rgba(255, 255, 255, .15);
    }
    #header #nav-menu ul li a { display: block; padding: 11px 14px; }
    #header #nav-menu ul li a.active-forums { padding-left: 36px; background-position: 12px 50%; }

    /* Search: full width, with a button */
    #menuBarExtend { height: auto; padding: 8px 12px !important; }
    #layoutsearch { float: none; display: block; border: 0; background: none; padding: 0 !important; }
    #layoutsearchInputs { display: flex; }
    .searchTextBox, .searchTextBoxEmpty, .autocompletePopulating {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
        height: 40px;
        box-sizing: border-box;
        font-size: 16px;            /* 16 px: iOS does not zoom on focus */
    }
    .search-button { height: 40px; font-size: 15px; padding: 0 16px; }

    /* One column: content, then the left sidebar (folded lists), then the right sidebar */
    .colmask,
    .holygrail .colmid,
    .holygrail .colleft,
    .holygrail .col1wrap,
    .holygrail .col1,
    .holygrail .col2,
    .holygrail .col3 {
        float: none;
        position: static;
        width: auto;
        margin: 0;
        left: auto;
        right: auto;
    }
    .colmask, .holygrail .col1 { overflow: visible; }
    .holygrail .col1 { padding: 0 12px 30px 12px; font-size: 16px; }
    .holygrail .col2, .holygrail .col3 { padding: 0 12px 20px 12px; font-size: 15px; }
    .col1 h1, .col1 h2 { font-size: 150%; }
    .member-zone-login { display: none; }   /* the member bar has Log in / Register */

    details.fold > summary { cursor: pointer; }
    details.fold > summary h2::after { content: "+"; float: right; }
    details.fold[open] > summary h2::after { content: "\2212"; }
    .col2 h2 { padding: 11px 10px 10px 10px; }

    /* Page index moved above the content by j1-mobile.js: same black box as in the sidebar */
    .col1 .context-fold { margin: 10px 0 14px 0; }
    .col1 .context-fold > summary h2 {
        margin: 0;
        padding: 11px 10px 10px 10px;
        border: 0;
        background: #000;
        color: #fff;
        font-size: 125%;
        text-shadow: none;
    }
    .col1 .context-fold ul { margin: 0; }
    .col1 .context-fold li a { display: block; padding: 11px 8px; }

    /* Right-column sections: folded (except on the home page), the title is the toggle */
    .col3 details.side-fold > summary { cursor: pointer; }
    .col3 details.side-fold > summary h2 { margin: 0; padding: 12px 0 10px 0; }
    .col2 li a { display: block; padding: 11px 4px; }
    .col2 .unstyled-list li { display: inline-block; }
    .col2 .unstyled-list li a { padding: 11px 12px; }
    .col3 li > a:first-child, .col3 .seemore { display: inline-block; padding: 6px 0; }

    /* Artist page: photo full width, discography tiles 2 per row */
    #artistInfosContainer .artist-picture {
        float: none;
        display: block;
        box-sizing: border-box;
        width: auto;
        max-width: 100%;
        margin: 0 0 10px 0;
    }
    .discographyContainer { width: calc(50% - 6px); margin: 0 0 14px 0; }
    .discographyContainer .album-cover { box-sizing: border-box; width: 100%; max-width: 170px; }

    /* Wide content scrolls inside its own box, never the page */
    .col1 table { display: block; max-width: 100%; overflow-x: auto; }
    pre { white-space: pre-wrap; }

    #footer { float: none; }
    #footer-content { padding: 12px; margin-bottom: 0; }
    #footer-content a { display: inline-block; padding: 6px 0; }
}
