/* RUFFIANS MC MEMBERS AREA THEME
   Loaded after ruffians.css (or login.css) to match the public site:
   black, pewter and brass, club font headings, serif body, slide-out menu.
   Screen only, so printed pages and saved reports keep their print styling. */

@media screen {
    :root {
        --black: #000;
        --charcoal: #1a1918;
        --pewter: #b9b8b2;
        --pewter-dim: #74736d;
        --bone: #ece7dc;
        --brass: #b4935e;

        /* the names the existing pages already use */
        --font: 17px;
        --text: var(--bone);
        --subtle: #8a8983;
        --very_subtle: #2c2b29;
        --offblack: var(--black);
        --logo: var(--pewter);
        --header: var(--pewter);
        --header_line: #3a3936;
        --accent_color: var(--brass);
        --link_color: var(--brass);
        --table_border: #4a4943;
        --top_row: var(--charcoal);
        --bottom_row: var(--charcoal);
        --pos_color: #7fa77f;
        --neg_color: #d9534f;
    }
    html { font-size: 17px; line-height: 1.5; }
    body {
        position: relative; min-height: 100vh;
        background: var(--black); background-image: none;
        font-family: 'Alegreya', Georgia, serif;
        font-size: 1rem; line-height: 1.5; font-weight: 400;
        overflow-x: hidden;
    }
    #main { min-height: 100vh; width: 100%; padding-bottom: 1rem; }
    a:link, a:visited { color: var(--brass); }
    a:hover { color: var(--bone); }
    :focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

    /* headings in the club font */
    h1 {
        display: block; vertical-align: baseline;
        font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; font-weight: 600;
        font-size: clamp(1.4rem, 3.5vw, 1.8rem); line-height: 1.2; letter-spacing: 0.01em;
        color: var(--pewter); margin: 1.25rem 1vw 1rem;
    }
    h1::after { display: none; }
    h1.noprint[style] { height: 1rem; margin: 0; }
    h2 { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; font-size: 1.1rem; line-height: 1.4; color: var(--bone); font-weight: 600; padding-top: 1rem; }
    h3 { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
    h2::after { height: 1px; background: var(--header_line); }
    h3 { color: var(--bone); }

    /* data: tables, fields and buttons use a compact sans-serif so more fits on a page */
    table, table td, table th, input, select, textarea, button, .padded, .inlinebutton, .inlineselect, .inlinedatepicker {
        font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    }
    table, table td, table th { font-size: 0.8rem; line-height: 1.35; }
    table td, table th { padding: 0.2rem 0.45rem; }
    input, select, textarea, button { font-size: 0.85rem; }
    table input, table select, table textarea, table button, table .inlinebutton { font-size: 0.8rem; }
    input.inlinedatepicker, select.inlineselect { font-size: 0.85rem; padding: 0.15rem 0.35rem; }
    .docview, .doc_body { font-family: 'Alegreya', Georgia, serif; } /* constitution and bylaws stay book-style */

    /* buttons and fields */
    button, .padded { border-color: var(--brass); color: var(--brass); border-radius: 0.35rem; cursor: pointer; padding: 0.35rem 0.7rem; }
    button:hover { color: var(--bone); border-color: var(--bone); text-decoration: none; }
    .inlinebutton, .inlineselect, .inlinedatepicker { color: var(--bone); border-bottom: 1px dashed #4a4943; border-radius: 0; }
    .inlinebutton:hover { color: var(--brass); }
    .add { background: #3f5a3f; border-color: #5e7f5e; color: var(--bone); }
    .delete { background: #7a2421; border-color: #a33a35; color: var(--bone); }
    .edit { background: var(--pewter-dim); border-color: var(--pewter); color: var(--black); }
    input, select, textarea { color: var(--bone); }
    input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
        background: var(--charcoal); border: 1px solid #4a4943; border-radius: 0.3rem; padding: 0.3rem 0.45rem;
    }
    .inlineselect, .inlinedatepicker { background: transparent; border: 0; border-bottom: 1px dashed #4a4943; padding: 0; }
    select option { background: var(--charcoal); color: var(--bone); }

    /* footer: plain, not a fixed bar */
    .copyright {
        position: static; margin-top: 2rem; padding: 1.5rem 1rem;
        background: none; color: var(--pewter-dim); border-top: 1px solid #222; font-size: 0.9rem;
    }
    .copyright summary { cursor: pointer; }

    /* top bar: banner left, menu button right */
    .topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
        padding: 1rem clamp(1rem, 4vw, 2.5rem) 0; min-height: 5rem; }
    .brand { display: inline-flex; align-items: center; gap: 0.9rem; color: var(--pewter); }
    a.brand:link, a.brand:visited { display: inline-flex !important; color: var(--pewter); text-decoration: none; }
    a.brand:hover { color: var(--bone); }
    .brand_logo { display: block; height: 4.5rem; width: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.7)); }
    .brand_name { font-family: 'RuffiansMC', Georgia, serif; font-size: 1.6rem; line-height: 1.05; letter-spacing: 0.02em; }
    .brand_name sup { font-family: Arial, sans-serif; font-size: 0.35em; vertical-align: top; position: relative; top: 0.25em; margin-left: 0.1em; }

    .menu_button {
        position: fixed; top: 1rem; right: clamp(1rem, 4vw, 2.5rem); z-index: 25;
        display: inline-flex; align-items: center; gap: 0.6rem;
        padding: 0.5rem 0.9rem;
        background: var(--charcoal); color: var(--pewter);
        border: 1px solid var(--pewter-dim); border-radius: 0.4rem;
        outline: 1px dashed var(--pewter-dim); outline-offset: -5px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.6);
        font: inherit; font-size: 1rem;
    }
    .menu_button:hover { color: var(--bone); border-color: var(--pewter); }
    .menu_button:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
    .bars { display: grid; gap: 4px; }
    .bars span { display: block; width: 1.3rem; height: 2px; background: currentColor; }

    .menu_scrim { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,0.6);
        opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
    .menu_panel {
        position: fixed; top: 0; right: 0; bottom: 0; z-index: 40;
        width: min(22rem, 88vw); background: var(--charcoal);
        border-left: 1px solid var(--pewter-dim);
        padding: 1.25rem 1.75rem 2rem;
        transform: translateX(100%); visibility: hidden;
        transition: transform 0.3s ease, visibility 0s 0.3s;
        overflow-y: auto; text-align: left;
    }
    body.menu_open .menu_scrim { opacity: 1; pointer-events: auto; }
    body.menu_open .menu_panel { transform: translateX(0); visibility: visible; transition: transform 0.3s ease; }
    body.menu_open { overflow: hidden; }
    .menu_close { float: right; background: none; border: 0; color: var(--pewter);
        font-size: 2rem; line-height: 1; padding: 0.25rem 0.5rem; }
    .menu_close:hover { color: var(--bone); }
    .menu_user { clear: both; padding: 0.75rem 0 0.25rem; color: var(--pewter-dim); font-size: 0.95rem; }
    .menu_user b { display: block; color: var(--bone); font-size: 1.15rem; font-weight: 500; }
    .menu_user .menu_user_link { display: block; padding: 0; margin: 0.1rem 0; background: none; border: 0; border-radius: 0;
        color: var(--bone); font-family: inherit; font-size: 1.15rem; font-weight: 500; text-align: left;
        text-decoration: underline dotted var(--pewter-dim); text-underline-offset: 0.25em; }
    .menu_user .menu_user_link:hover, .menu_user .menu_user_link[aria-current="page"] { color: var(--brass); }
    .menu_panel ul { list-style: none; margin: 0.5rem 0 0; padding: 0; }
    .menu_panel li { border-bottom: 1px dashed #3a3936; }
    .menu_panel .main_link {
        display: block; width: 100%; padding: 0.7rem 0; text-align: left;
        background: none; border: 0; border-radius: 0;
        font-family: 'RuffiansMC', Georgia, serif; font-size: 1.5rem; line-height: 1.2;
        color: var(--pewter);
    }
    .menu_panel .main_link:hover, .menu_panel .main_link[aria-current="page"] { color: var(--bone); text-decoration: none; }
    .menu_panel .main_link[aria-current="page"]::before { content: ""; display: inline-block; width: 0.45rem; height: 0.45rem;
        background: var(--brass); transform: rotate(45deg); margin: 0 0.6rem 0.25rem 0; }
    .menu_actions { display: flex; gap: 0.6rem; margin-top: 1.5rem; }
    .menu_actions button { flex: 1; padding: 0.6rem 0.8rem; }
    .menu_actions .logout { border-color: var(--brass); color: var(--brass); }
    .menu_actions .logout:hover { background: var(--brass); color: var(--black); }
    .menu_site { display: block; margin-top: 1.25rem; text-align: center; font-size: 0.95rem; }

    /* faint motorcycle photo behind the top of the page, when one exists */
    .bg_photo { position: absolute; top: 0; left: 0; right: 0; z-index: -1; height: 60vh;
        background-position: center top; background-size: cover; background-repeat: no-repeat;
        filter: grayscale(1) brightness(0.6);
        -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
                mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
        pointer-events: none; }

    /* constitution and bylaws: same reading style as the public site */
    .docview { max-width: 58rem !important; padding: 0 1vw !important; }
    .doc_body { font-size: 1.1rem; }
    .doc_body h2 { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; font-weight: 600; color: var(--pewter);
        font-size: 1.4rem; line-height: 1.2; margin: 2.25rem 0 0.75rem; padding: 0; }
    .doc_body h2::after { display: none; }
    .doc_body h3 { font-size: 1.2rem; margin: 1.5rem 0 0.4rem; }
    .doc_body p, .doc_body li { line-height: 1.7; }
    @media (min-width: 1100px) { #main { transition: padding-right 0.3s ease; }
        body.search_open #main { padding-right: 21rem; } }

    /* store item list */
    .store_list { border: 1px solid var(--table_border); }
    .store_list tr { border-bottom: 1px solid #34332f; vertical-align: middle; }
    .store_list tr:first-child { background: var(--top_row); font-style: italic; color: var(--subtle); }
    .store_list td { padding: 0.35rem 0.6rem; }

    /* login screen */
    .login_card {
        display: block;
        max-width: 26rem; width: calc(100% - 2rem); margin: 3rem auto 2rem; padding: 2rem 2rem 1.75rem;
        background: var(--charcoal); border: 1px solid #34332f; border-radius: 1rem;
        outline: 2px dashed #4a4943; outline-offset: -9px;
    }
    .login_card h1 { margin: 0 0 1.25rem; text-align: center; font-size: 1.5rem; }
    .login_card label { display: block; margin: 0.9rem 0 0.3rem; color: var(--pewter); }
    .login_card input[type=text], .login_card input[type=password] { width: 100%; font-size: 1.05rem; padding: 0.55rem 0.7rem; }
    .login_card .login { width: 100%; margin-top: 1.5rem; padding: 0.7rem; font-size: 1.05rem;
        background: var(--brass); border-color: var(--brass); color: var(--black); font-weight: 700; text-align: center; }
    .login_card .login:hover { background: var(--bone); border-color: var(--bone); }
    .login_card .warning { display: block; margin-bottom: 1rem; color: var(--neg_color); text-align: center; }
    .login_card .hint { margin: 1.25rem 0 0; font-size: 0.9rem; color: var(--pewter-dim); text-align: center; }
    a.login_back { display: block !important; width: max-content; margin: 0 auto; font-size: 0.95rem; }

    @media (max-width: 600px) {
        .brand_logo { height: 3.2rem; } .brand_name { font-size: 1.2rem; }
        .menu_button .menu_word { display: none; }
        html { font-size: 16px; }
    }
    @media (prefers-reduced-motion: reduce) {
        .menu_panel, .menu_scrim { transition: none; }
    }
}

@media print {
    .topbar, .menu_button, .menu_panel, .menu_scrim, .bg_photo { display: none !important; }
}
