/* =========================================================
   MEMBER RECORD

   Loaded by member/view.php only, the same way
   directory.css is loaded by member/index.php.

   Everything is prefixed .mv- so nothing here can reach
   another page. The old .profile-head, .profile-facts and
   .member-accordion rules in custom.css stay where they
   are - Add and Edit still use them.
========================================================= */

.mv-page {
    /* The hero above already clears the fixed nav, so this is
       breathing room rather than clearance. */
    padding: 28px 0 70px;
    background: #ffffff;
}

.mv-wrap {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}


/* =========================================================
   THE RAIL

   A quiet tinted panel rather than white - enough to give
   the page a left-hand edge, not enough to compete with the
   record itself. The cards inside it are white, so they
   still read as things you can press.
========================================================= */

.mv-rail {
    position: sticky;

    /* scripts.js adds .navbar-fixed past 70px of scroll and
       the fixed bar is 89px tall. 105px keeps the rail clear
       of it instead of sliding underneath. */
    top: 105px;
}

.mv-railcard {
    padding: 20px 18px 18px;

    background: #f6f7fc;
    border: 1px solid #e6e8f0;
    border-radius: 16px;
}


/* ---------- photo ---------- */

.mv-face,
.mv-face-img {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    aspect-ratio: 1;

    border-radius: 13px;
}

.mv-face {
    background: linear-gradient(150deg, #eef0ff, #e2e6ff);

    color: #525fe1;
    font-size: 56px;
    font-weight: 600;
    letter-spacing: .02em;
}

.mv-face-img {
    object-fit: cover;
    background: #ffffff;
    border: 1px solid #e6e8f0;
    cursor: zoom-in;
}

.mv-face-hint {
    margin: 9px 0 0;
    color: #959cab;
    font-size: 12px;
    text-align: center;
}


/* ---------- standing ---------- */

.mv-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 15px;
}

.mv-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 4px 11px;
    border-radius: 20px;

    font-size: 12.5px;
    font-weight: 600;
}

.mv-pill i { font-size: 11px; }

.mv-pill-on  { background: #e8f8ef; color: #1f9d63; }
.mv-pill-off { background: #fdeceb; color: #c9303f; }
.mv-pill-id  { background: #ffffff; border: 1px solid #e0e3ed; color: #6b7382; }


/* ---------- ways to reach them ---------- */

.mv-acts {
    display: grid;
    gap: 7px;
    margin-top: 18px;
}

.mv-act {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 12px;

    background: #ffffff;
    border: 1px solid #e0e3ed;
    border-radius: 9px;

    color: #38415a;
    font-size: 14px;
    text-decoration: none;

    min-width: 0;
}

.mv-act:hover {
    border-color: #525fe1;
    color: #525fe1;
    text-decoration: none;
}

.mv-act i {
    flex: 0 0 15px;
    color: #959cab;
    font-size: 14px;
}

.mv-act:hover i { color: #525fe1; }

.mv-act b {
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mv-act-sub {
    margin-left: auto;
    padding-left: 8px;
    color: #959cab;
    font-size: 12.5px;
    white-space: nowrap;
}

/* The address is not something you tap, so it is not a link. */
.mv-act-plain {
    cursor: default;
    align-items: flex-start;
}

.mv-act-plain i { margin-top: 3px; }

.mv-act-plain b {
    white-space: normal;
    font-weight: 500;
    line-height: 1.45;
}

.mv-act-plain:hover {
    border-color: #e0e3ed;
    color: #38415a;
}

.mv-act-plain:hover i { color: #959cab; }

.mv-nocontact {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 11px 12px;

    background: #fff3ed;
    border: 1px solid #f3ddd1;
    border-radius: 9px;

    color: #b8481a;
    font-size: 13.5px;
    font-weight: 600;
}


/* ---------- three things worth knowing ---------- */

.mv-glance {
    margin: 18px 0 0;
    padding-top: 15px;
    border-top: 1px solid #e3e6f0;
}

.mv-gl {
    display: flex;
    justify-content: space-between;
    gap: 12px;

    padding: 6px 0;
    font-size: 13.5px;
}

.mv-gl dt {
    margin: 0;
    color: #6b7382;
    font-weight: 600;
}

.mv-gl dd {
    margin: 0;
    text-align: right;
    color: #38415a;
}

.mv-blank {
    color: #959cab;
    font-style: italic;
}


/* =========================================================
   THE TIMELINE

   Born, baptised, married, joined. The one genuinely
   chronological thing about a member record, so it gets the
   top of the detail column.

   A stop with no date is drawn hollow rather than dropped.
   An empty marker is a prompt to go and ask; a vanished one
   says nothing at all.
========================================================= */

.mv-time {
    padding: 6px 0 26px;
    margin-bottom: 22px;
    border-bottom: 1px solid #e6e8f0;
}

.mv-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-top: 4px;
}

/* Starts at the first marker and stops at the last, so it
   reads as a span of time rather than a line running off the
   page in both directions. */
.mv-track:before {
    content: "";
    position: absolute;
    left: 12.5%;
    right: 12.5%;
    top: 7px;

    height: 2px;
    background: linear-gradient(90deg, #525fe1, #eb6834);
}

.mv-stop {
    position: relative;
    padding: 0 6px;
    text-align: center;
}

.mv-mark {
    position: relative;

    width: 16px;
    height: 16px;
    margin: 0 auto 12px;

    background: #ffffff;
    border: 3px solid #525fe1;
    border-radius: 50%;
}

.mv-stop.mv-late .mv-mark { border-color: #eb6834; }
.mv-stop.mv-off  .mv-mark { border-color: #d3d7e3; }

.mv-yr {
    color: #1b2130;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
}

.mv-stop.mv-off .mv-yr {
    color: #959cab;
    font-weight: 600;
}

.mv-lb {
    margin-top: 1px;
    color: #6b7382;
    font-size: 13px;
}

.mv-dt {
    margin-top: 1px;
    color: #959cab;
    font-size: 12.5px;
}


/* =========================================================
   SECTIONS

   Nothing collapses. The heading marks where a section
   starts; it is not a lid over it. On a record you came here
   to read, a closed section is a section you will not read.

   One treatment for every heading. Seven coloured bands
   would compete with the thing you came for, and the quiet
   is what buys the one exception below.
========================================================= */

.mv-group {
    margin-bottom: 18px;

    background: #ffffff;
    border: 1px solid #e6e8f0;
    border-radius: 12px;

    overflow: hidden;
}

.mv-gh {
    display: flex;
    align-items: center;
    gap: 13px;

    padding: 14px 18px;

    background: #f3f4f8;
    border-bottom: 1px solid #e6e8f0;
}

.mv-gi {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eef0ff;
    border-radius: 9px;

    color: #525fe1;
    font-size: 16px;
}

.mv-gh h2 {
    margin: 0;
    color: #1b2130;
    font-size: 16.5px;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.3;
}

/* Says what is inside, rather than "View X information" on
   every one - a line that repeats seven times is noise. */
.mv-gh p {
    margin: 1px 0 0;
    color: #6b7382;
    font-size: 13px;
    line-height: 1.35;
}

.mv-gb {
    padding: 20px 18px 22px;
}


/* ---------- the one exception ----------

   The block you look up in a hurry, and the only thing on
   the page allowed to raise its voice. */

.mv-sos { border-color: #f3ddd1; }

.mv-sos .mv-gh {
    background: #fff3ed;
    border-bottom-color: #f7dbcd;
}

.mv-sos .mv-gi    { background: #fbe0d2; color: #d2551f; }
.mv-sos .mv-gh h2 { color: #b8481a; }
.mv-sos .mv-gh p  { color: #b07a58; }


/* =========================================================
   FIELDS
========================================================= */

.mv-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 26px;
    margin: 0;
}

.mv-grid-tight {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #e6e8f0;
}

.mv-f { min-width: 0; }

/* The label carries weight, so a column can be found by its
   heading without reading the value underneath. Darker as
   well as bolder - bold pale grey just reads muddy. The
   value still wins on size and contrast, which is the order
   you want: what it is, then what it says. */
.mv-f dt {
    margin-bottom: 3px;
    color: #6b7382;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .005em;
}

.mv-f dd {
    margin: 0;
    color: #1b2130;
    font-size: 15px;
    line-height: 1.5;
    word-break: break-word;
}

.mv-f dd a {
    color: #525fe1;
    text-decoration: none;
}

/* Hover AND focus, and a colour change as well as the
   underline. Underline alone is the only cue for a mouse
   user, and no cue at all for somebody tabbing through with
   a keyboard - the two contact links and the stand-in parent
   rows were the last places still missing it. */
.mv-f dd a:hover,
.mv-f dd a:focus-visible {
    color: var(--site-accent-ink, #303e8c);
    text-decoration: underline;
}

.mv-standin-row > a:hover,
.mv-standin-row > a:focus-visible,
.mv-standin-row a:hover,
.mv-standin-row a:focus-visible {
    color: var(--site-accent-ink, #303e8c);
    text-decoration: underline;
}

.mv-f.mv-num dd { font-variant-numeric: tabular-nums; }

.mv-wide { grid-column: 1 / -1; }

/* A blank field still prints, as "Not recorded". An empty
   space would leave you guessing whether the answer is "no"
   or "nobody has asked yet", and those are different things
   to a secretary chasing a form. */
.mv-none {
    color: #959cab;
    font-style: italic;
}

.mv-soft { color: #6b7382; }


/* ---------- people ---------- */

.mv-person {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 11px 0;
    border-top: 1px dashed #e6e8f0;
}

.mv-person:first-child {
    border-top: 0;
    padding-top: 0;
}

.mv-chip {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #e8f8ef;
    border-radius: 9px;

    color: #178553;
    font-size: 13.5px;
    font-weight: 600;
}

.mv-person b {
    display: block;
    color: #1b2130;
    font-size: 14.5px;
    font-weight: 600;
}

.mv-person span {
    color: #6b7382;
    font-size: 13px;
}

.mv-person .mv-r {
    margin-left: auto;
    padding-left: 12px;
    text-align: right;
    color: #6b7382;
    font-size: 13px;
    white-space: nowrap;
}


/* =========================================================
   NARROWER SCREENS
========================================================= */

@media (max-width: 1100px) {

    .mv-wrap {
        grid-template-columns: 250px minmax(0, 1fr);
        gap: 28px;
    }

    .mv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


@media (max-width: 860px) {

    .mv-wrap {
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
    }

    /* Sticky is pointless once the rail is a band across the
       top - it would pin a block of the page to the screen. */
    .mv-rail { position: static; }

    .mv-railcard {
        display: grid;
        grid-template-columns: 150px minmax(0, 1fr);
        gap: 0 20px;
        align-items: start;
    }

    .mv-face,
    .mv-face-img { grid-row: 1 / 3; }

    .mv-badges { margin-top: 0; }

    .mv-acts,
    .mv-glance { grid-column: 2; }

    .mv-glance { margin-top: 16px; }

    /* Four stops will not fit across a tablet, so the line
       turns the corner and runs down the page. */
    .mv-track { grid-template-columns: repeat(2, 1fr); gap: 22px 0; }
    .mv-track:before { display: none; }
}


@media (max-width: 560px) {

    .mv-railcard {
        display: block;
        padding: 18px 16px 16px;
    }

    .mv-face,
    .mv-face-img {
        width: 150px;
        margin: 0 auto;
    }

    .mv-badges {
        justify-content: center;
        margin-top: 15px;
    }

    .mv-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }

    .mv-track { grid-template-columns: minmax(0, 1fr); gap: 16px 0; }

    .mv-stop {
        display: grid;
        grid-template-columns: 30px minmax(0, 1fr);
        align-items: start;
        text-align: left;
    }

    /* Beside the year, not floating in the middle of the
       three lines. */
    .mv-mark { grid-row: 1 / 4; margin: 6px 0 0; }
    .mv-yr, .mv-lb, .mv-dt { grid-column: 2; }

    .mv-person .mv-r { display: none; }
}


/* =========================================================
   PRINT

   member/print.php is still the proper printout. This is
   only so Ctrl+P on the record itself is not a mess.
========================================================= */

@media print {

    .app-hero-actions,
    .mv-acts,
    .mv-face-hint { display: none !important; }

    .mv-wrap { display: block; }

    .mv-railcard { background: #ffffff; }

    .mv-group { break-inside: avoid; }
}


/* Nothing known yet - the line should not imply a journey
   that has not been recorded. */
.mv-track-empty:before {
    background: #e4e7ef;
}


/* =========================================================
   A CHILD WHO GREW UP

   Past the teen age, a child on a parent's record can be
   given a record of their own. The child row never goes
   away - they were still that parent's child - so both
   states need somewhere to show.
========================================================= */

.mv-promote,
.mv-grown {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    margin-top: 5px;
    padding: 3px 10px;

    border-radius: 20px;

    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .01em;
    text-decoration: none;
}

/* An offer, not a warning. Quiet until it is hovered. */
.mv-promote {
    background: #fff6f1;
    border: 1px solid #f3d2bd;
    color: #b8481a;
}

.mv-promote:hover {
    background: #eb6834;
    border-color: #eb6834;
    color: #ffffff;
}

/* Already done. A statement of fact and a way through. */
.mv-grown {
    background: #eef0fe;
    border: 1px solid #d5daf9;
    color: #3a46c0;
}

.mv-grown:hover {
    background: #525fe1;
    border-color: #525fe1;
    color: #ffffff;
}

.mv-promote i,
.mv-grown i {
    font-size: 10.5px;
}

/* ---------------------------------------------------------
   WHEN A PARENT'S DETAILS STAND IN FOR A CHILD'S

   Used in two places: Contact, when a child has no number or
   email of their own, and "If something happens", when no
   emergency contact was filled in.

   Visually distinct from the member's own fields ON PURPOSE.
   These are somebody else's details shown here for
   convenience, and the page should never let them be mistaken
   for the child's own.
--------------------------------------------------------- */

.mv-standin {
    margin-top: 16px;
    padding: 14px 16px;

    background: #f7f8fc;
    border: 1px dashed #c9cde0;
    border-radius: 10px;
}

.mv-standin-head {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #5c6071;
}

.mv-standin-head i {
    margin-right: 6px;
    color: #4e5ad6;
}

.mv-standin-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;

    padding: 7px 0;
    border-top: 1px solid #e6e9f2;
}

.mv-standin-row:first-of-type { border-top: 0; }

.mv-standin-row > a { font-weight: 600; }

@media only screen and (max-width: 600px) {
    .mv-standin-row { gap: 6px 12px; }
}


.mv-person b a:hover,
.mv-person b a:focus-visible {
    color: var(--site-accent-ink, #303e8c);
    text-decoration: underline;
}
/* Keep the nonmember-parent upgrade link readable on hover and focus. */
.mv-person a.mv-soft:hover,
.mv-person a.mv-soft:focus-visible {
    color: var(--site-accent-ink, #303e8c);
    text-decoration: underline;
}


.mv-person a.mv-soft:hover,
.mv-person a.mv-soft:focus {
    color: var(--site-accent-ink, #303e8c) !important;
    text-decoration: underline;
}

.mv-gh {
    background: var(--site-primary, #303e8c) !important;
    color: var(--site-on-primary, #ffffff) !important;
}

.mv-gh h2,
.mv-gh p {
    color: var(--site-on-primary, #ffffff) !important;
}

.mv-gi {
    background: #ffffff20 !important;
    color: var(--site-on-primary, #ffffff) !important;
}