/* Project-owned frontend styles (kept out of the mirrored elmos_assets).
   Proposal 0056: required-field asterisk in Elmos red.
   Proposal 0095: unified on the original site's form red #cc2960 and
   extended to the powermail .mandatory spans (the mirror rule lives in
   elmos/Css/styles.css, which the landing templates don't load). */
.text-elmos-required,
.mandatory {
    color: #cc2960;
}

/* Proposal 0074: homepage "News on Social Media" cards — the white text box
   must hug the image instead of stretching to the equal-height row, which
   left a big blank between the text and the bottom-pinned link when the
   editors uploaded images of differing sizes. The mirrored elmos.css rules
   (.news-flex-col flex column + .frame-type-text flex:1) stay untouched. */
.news-flex-col .frame-type-text {
    flex: none;
}

/* Proposal 0103: footer contact column a bit wider so the (long) email
   address does not wrap to a second line after the More Links column
   merged into About. */
.footer-contact {
    flex: 0 0 auto;
    width: 28%;
}

/* Proposal 0105: collapsed locations group ("other offices") — native
   details/summary, styled like a table group header with a toggle cue. */
.location-collapsed > summary {
    cursor: pointer;
    font-weight: bold;
    padding: 8px 12px;
    background: #f2f2f2;
    list-style: none;
}
.location-collapsed > summary::before {
    content: "\25B8";  /* right-pointing triangle */
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.15s ease-in-out;
}
.location-collapsed[open] > summary::before {
    transform: rotate(90deg);
}
.location-collapsed > figure.table {
    margin-top: 0;
}

/* Proposal 0115: CJK-first uniform font stack. The mirrored Roboto /
   Roboto Condensed webfonts are latin-only subsets, and pairing the
   condensed Latin with a wide CJK fallback looked jarring — so Chinese,
   Latin and digits all render with the platform's native sans
   (Windows YaHei / Apple PingFang / Linux Source Han). The brand fonts
   stay in the stack as last-resort fallbacks. */
:root {
    --bs-font-sans-serif: "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC",
        "Roboto Condensed", sans-serif;
}
body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
        "Noto Sans SC", "Source Han Sans SC", "Roboto Condensed",
        sans-serif;
}
/* Roboto (non-condensed) headings: landing h1-h3 and the mask page
   header h1 — main-site content headings inherit the body font and
   must NOT be re-declared (would switch their Latin look). */
.elmos-landing h1, .elmos-landing h2, .elmos-landing h3,
.mask-pageheader .mask-pageheader-title h1,
.mask-pageheader .mask-pageheader-title .h1 {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
        "Noto Sans SC", "Source Han Sans SC", "Roboto", sans-serif;
}

/* Proposal 0138: footer contact email link must be white. Original-site
   design colors `#page-footer .footer-contact a.mail` white via mirror
   CSS, but the Chinese default contact block (0085) carries a plain
   mailto anchor without the class — it falls through to the global
   `a{color:#a9003d}` Elmos red, unreadable on the dark footer. Attribute
   selector keeps it class-independent (Draftail strips link classes on
   admin save anyway); scoped so nothing outside the footer contact
   column is affected; hover underline mirrors the a.mail hover rule. */
#page-footer .footer-contact a[href^="mailto:"] {
    color: #fff;
}
#page-footer .footer-contact a[href^="mailto:"]:hover {
    text-decoration: underline;
}

/* Mobile table responsiveness: text wrapping + horizontal scroll fallback.
   Addresses overflow on narrow viewports for tables such as the locations
   page and distribution page. */
@media (max-width: 767.98px) {
    .table-responsive-mobile {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table-responsive-mobile table {
        width: 100%;
        min-width: 500px;
    }
    .table-responsive-mobile th,
    .table-responsive-mobile td {
        word-break: break-word;
        overflow-wrap: anywhere;
        white-space: normal;
        max-width: 250px;
    }
}

/* 0164: job accordion label color switch (JobsAccordionBlock.label_color).
   Brand red, applied to the two label <p>s only; default black = inherit. */
p.job-label-red {
    color: #a9003d;
}
