/* ===========================================================
   MONUMENTAS — membercardm.css
   Shared by the homepage "Latest members" strip and members.html: the member
   name card, its grid, and the two pill buttons. No cube styles.
=========================================================== */

/* ---------- buttons ---------- */

.membersPrimary{
    border:none;
    background:#111;
    color:#fff;
    padding:15px 30px;
    border-radius:999px;
    cursor:pointer;
    font-family:inherit;
    font-size:16px;
    font-weight:600;
    transition:transform .2s, background .2s;
}

.membersPrimary:hover:not(:disabled){
    transform:translateY(-2px);
    background:#000;
}

.membersPrimary:disabled{
    opacity:.5;
    cursor:default;
}

.membersGhost{
    border:1px solid #d6d6d6;
    background:transparent;
    color:#111;
    padding:12px 22px;
    border-radius:999px;
    cursor:pointer;
    font-family:inherit;
    font-size:14px;
    font-weight:600;
    transition:background .2s, border-color .2s;
}

.membersGhost:hover:not(:disabled){
    background:#fff;
    border-color:#111;
}

.membersGhost:disabled{
    opacity:.5;
    cursor:default;
}

/* ---------- the card (also used in the admin dashboard) ---------- */

.wallGrid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(240px, 300px));
    justify-content:center;
    gap:18px;
}

.memberCard{
    --hue:215;
    --name-font:'Inter', sans-serif;
    --name-size:26px;
    --card-fg:#111;
    display:flex;
    flex-direction:column;
    gap:14px;
    min-height:190px;
    padding:24px 24px 22px;
    border-radius:28px;
    background:linear-gradient(150deg, hsl(var(--hue) 80% 97%), hsl(var(--hue) 65% 91%));
    border:1px solid hsl(var(--hue) 45% 86%);
    box-shadow:0 10px 28px rgba(0,0,0,.05);
    color:var(--card-fg);
    text-align:left;
    cursor:pointer;
    transition:transform .25s, box-shadow .25s;
}

/* A member-chosen colour replaces the automatic soft gradient. */
.memberCard.hasCustomBg{
    background:var(--card-bg);
    border-color:rgba(0,0,0,.1);
}

.memberCard:hover, .memberCard:focus-visible{
    transform:translateY(-4px);
    box-shadow:0 18px 40px rgba(0,0,0,.1);
    outline:none;
}

.memberCardMeta, .memberHint{
    font-size:12px;
    font-weight:600;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:var(--card-fg);
    opacity:.55;
}

.memberName{
    font-family:var(--name-font);
    font-size:var(--name-size);
    font-weight:700;
    line-height:1.15;
    letter-spacing:-.02em;
    color:var(--card-fg);
    overflow-wrap:anywhere;
}

.memberHint{
    margin-top:auto;
}

/* ---------- the popup that opens when a card is pressed (like the cube's space panel) ---------- */

.mcBackdrop{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.35);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:3000;
}

.mcBackdrop.mcHidden{
    display:none;
}

.mcPanel{
    position:relative;
    width:340px;
    max-width:85%;
    max-height:85vh;
    overflow-y:auto;
    background:#fff;
    border-radius:24px;
    padding:68px 30px 30px;
    box-shadow:0 25px 60px rgba(0,0,0,.25);
    text-align:center;
}

.mcClose{
    position:absolute;
    top:14px;
    right:14px;
    width:36px;
    height:36px;
    border:none;
    border-radius:50%;
    background:#f0f0f0;
    cursor:pointer;
    font-size:20px;
    line-height:1;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:.2s;
}

.mcClose:hover{
    background:#111;
    color:#fff;
}

.mcName{
    font-size:14px;
    color:#999;
    margin-bottom:18px;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.5px;
    overflow-wrap:anywhere;
}

.mcLink{
    display:block;
    width:100%;
    padding:18px;
    margin-bottom:12px;
    border:none;
    border-radius:14px;
    background:#f0f0f0;
    color:#111;
    font-family:inherit;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    transition:.25s;
    overflow-wrap:anywhere;
}

.mcLink:hover{
    transform:translateY(-2px);
}

.mcLink:last-child{
    margin-bottom:0;
}

.mcEmpty{
    color:#999;
    font-style:italic;
    padding:10px 0 20px;
}

/* ---------- homepage "Latest members" strip ---------- */

.membersPreview{
    width:840px;
    max-width:92%;
    margin:0 auto;
    padding-bottom:100px;
    text-align:center;
}

.membersPreview h2{
    font-size:34px;
    margin-bottom:30px;
}

.previewGrid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(190px, 220px));
    justify-content:center;
    gap:16px;
    text-align:left;
}

.previewGrid .memberCard{
    min-height:150px;
    padding:20px 20px 18px;
    border-radius:22px;
}

.previewGrid .memberName{
    font-size:calc(var(--name-size) * .75);
}

.previewEmpty{
    color:#999;
    font-style:italic;
}

.previewEmpty.hidden{
    display:none;
}

.previewButtons{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:12px;
    margin-top:30px;
}

.membersPrimary, .membersGhost{
    display:inline-block;
    text-decoration:none;
}

@media(max-width:900px){
    .previewGrid{ grid-template-columns:repeat(2, 1fr); }
    .previewGrid .memberCard{ padding:16px; }
    .previewGrid .memberName{ font-size:calc(var(--name-size) * .65); }
}

/* The pill buttons set their own display, which would otherwise beat .hidden. */
.membersPrimary.hidden, .membersGhost.hidden{
    display:none;
}


/* ---------- header links that look like pills (also used where leaderboardm.css is not loaded) ---------- */

.martinNavLink{
    display:inline-flex;
    align-items:center;
    gap:8px;
    border:1px solid rgba(0,0,0,.12);
    background:#fff;
    color:#111;
    padding:11px 18px;
    border-radius:999px;
    text-decoration:none;
    font-size:15px;
    font-weight:500;
    font-family:inherit;
    transition:.3s;
}

.martinNavLink:hover{
    transform:translateY(-2px);
    border-color:rgba(0,0,0,.2);
    box-shadow:0 8px 22px rgba(0,0,0,.08);
}

.martinNavLink svg{ color:#d7191c; flex:none; }

@media(max-width:900px){
    .martinNavLink .leaderboardButtonLabel{ display:none; }
    .martinNavLink{ padding:11px; }
}

/* Phones: with the Martin link added there are four items in the header, so tighten it. */
@media(max-width:520px){
    .navbar:has(.martinNavLink){ padding:0 14px; }
    .navbar:has(.martinNavLink) .navActions{ gap:6px; }
    .navbar:has(.martinNavLink) nav h1{ font-size:17px; letter-spacing:-.5px; }
    .navbar:has(.martinNavLink) .loginButton{ white-space:nowrap; padding:10px 14px; font-size:14px; }
    .navbar:has(.martinNavLink) .loginButton.signedIn{ padding:0; }
    .martinNavLink, .membersNavLink{ padding:9px; }
}

/* The header's right-hand group (links + account button) side by side. The home page already gets
   this from leaderboardm.css; the Members page doesn't load that file, so it is repeated here. */
.navActions{
    display:flex;
    align-items:center;
    gap:14px;
}

@media(max-width:900px){
    .navActions{ gap:10px; }
}
