/* Mahajana Newsroom — shared chrome (nav + search). Loaded with careers.css tokens. */

.mnr-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ─────────────────────────────────────────────
   IN-PAGE SEARCH BAR
   Lives in the page body (careers/includes/partials/newsroom-search-bar.php),
   NOT in the header — keeps the nav identical across every careers page.
   ───────────────────────────────────────────── */
.mnr-page-search {
    background: var(--bg-card);
    border-bottom: 1px solid var(--stroke-weak);
    padding: 18px 0;
}

.mnr-page-search__inner {
    display: flex;
}

.mnr-nav-search {
    width: 100%;
}

.mnr-nav-search__shell {
    position: relative;
    width: 100%;
    max-width: 560px;
}

.mnr-nav-search__pill {
    display: flex;
    align-items: center;
    width: 100%;
    border: 1.5px solid var(--stroke-strong);
    border-radius: 999px;
    corner-shape: round;
    background: var(--bg);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mnr-nav-search__pill:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(90, 1, 16, 0.12);
}

.mnr-nav-search__pill:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.mnr-nav-search__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 16px;
    padding-right: 4px;
    color: var(--text-weak);
    pointer-events: none;
}

.mnr-nav-search__icon svg {
    display: block;
}

.mnr-nav-search__input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 12px 4px 12px 2px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-body);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

/* Remove legacy WebKit / Edge clear controls (native “blue X” on search fields) */
.mnr-nav-search__input::-webkit-search-cancel-button,
.mnr-nav-search__input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.mnr-nav-search__input::-ms-clear {
    display: none;
}

.mnr-nav-search__input::placeholder {
    color: var(--text-weak);
}

.mnr-nav-search__clear {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin: 2px 5px 2px 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    corner-shape: round;
    background: transparent;
    color: var(--text-weak);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.mnr-nav-search__clear:hover {
    color: var(--brand);
    background: rgba(90, 1, 16, 0.06);
}

.mnr-nav-search__clear:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
}

.mnr-nav-search__dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 200;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 6px 0;
    margin: 0;
    background: var(--bg-card);
    border: 1px solid var(--stroke-weak);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-raised);
}

.mnr-nav-search__hit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--stroke-weak);
}

.mnr-nav-search__hit:last-child {
    border-bottom: 0;
}

.mnr-nav-search__hit:hover,
.mnr-nav-search__hit:focus-visible {
    background: var(--fill);
    outline: none;
}

.mnr-nav-search__hit-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--fill);
    border: 1px solid var(--stroke-weak);
}

.mnr-nav-search__hit-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mnr-nav-search__hit-thumb--empty {
    background: linear-gradient(
        135deg,
        rgba(201, 161, 59, 0.2) 0%,
        rgba(90, 1, 16, 0.12) 100%
    );
}

.mnr-nav-search__hit-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mnr-nav-search__hit-title {
    display: block;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-strong);
}

.mnr-nav-search__hit-meta {
    display: block;
    font-size: 12px;
    color: var(--text-weak);
}

@media (max-width: 640px) {
    .mnr-page-search {
        padding: 14px 0;
    }

    .mnr-nav-search__shell {
        max-width: none;
    }
}

/* ─────────────────────────────────────────────
   COVER — one, two or three photos side by side (mna_cover_html()).
   Fills whatever frame holds it: the article hero, the featured story and
   the story cards. In a narrow frame a three-photo cover becomes one photo
   across the top and two below, so no photo turns into a sliver.
   ───────────────────────────────────────────── */
.mna-cover {
    container-type: inline-size;
    width: 100%;
    height: 100%;
}

.mna-cover__grid {
    display: grid;
    grid-template-columns: repeat(var(--mna-cover-n, 1), minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    gap: 3px;
    width: 100%;
    height: 100%;
}

.mna-cover__grid--2 { --mna-cover-n: 2; }
.mna-cover__grid--3 { --mna-cover-n: 3; }

.mna-cover__cell {
    display: block;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.mna-cover__cell img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@container (max-width: 520px) {
    .mna-cover__grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: minmax(0, 3fr) minmax(0, 2fr);
    }

    .mna-cover__grid--3 > :first-child {
        grid-column: 1 / -1;
    }
}
