/* Parish announcements: a featured editorial card and an accessible, native disclosure archive. */

.parish-news-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem
}

.parish-news-heading h2 {
    font-family: var(--slab);
    font-size: var(--section-heading-size);
    color: var(--navy);
    margin: 0
}

.parish-news-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 285px;
    gap: 2rem;
    align-items: start
}

.parish-news-sidebar:only-child {
    grid-column: 1 / -1
}

.parish-news-lead {
    position: relative;
    background: #fff;
    border: 1px solid #e4ddd1;
    border-top: 5px solid #b1843b;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 14px 35px #26304d0b
}

    .parish-news-lead > :is(h1, h2) {
        font-family: var(--slab);
        line-height: 1.3;
        color: var(--navy);
        margin: 1rem 0 1.3rem
    }

.parish-news-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    font-size: .8rem;
    color: #636b79
}

.parish-news-badge {
    display: inline-block;
    padding: .4rem .65rem;
    border-radius: 4px;
    background: #f6efdF;
    color: #715020;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase
}

.parish-news-content {
    overflow-wrap: anywhere;
    line-height: 1.8;
    white-space: normal
}

    .parish-news-content > :first-child {
        margin-top: 0
    }

    .parish-news-content > :last-child {
        margin-bottom: 0
    }

    .parish-news-content p, .parish-news-content ul, .parish-news-content ol, .parish-news-content blockquote {
        margin-block: .7rem
    }

    .parish-news-content li {
        margin-block: .3rem
    }

    .parish-news-content h2, .parish-news-content h3, .parish-news-content h4 {
        font-family: var(--slab);
        color: var(--navy);
        line-height: 1.4;
        margin-block: 1rem .5rem
    }

    .parish-news-lead > h2 {
        font-size: var(--section-heading-size)
    }

    .parish-news-content h2 {
        font-size: 1.5rem
    }

@media (max-width: 767.98px) {
    .parish-news-content h2 {
        font-size: 1.375rem
    }
}

    .parish-news-content h3 {
        font-size: var(--subsection-heading-size)
    }

    .parish-news-content h4 {
        font-size: 1.1rem
    }

    .parish-news-content blockquote {
        border-left: 3px solid #b1843b;
        padding-left: 1rem;
        margin-left: 0;
        color: #62697a
    }

    .parish-news-content a {
        color: #195a89;
        text-decoration: underline dotted;
        text-underline-offset: 3px
    }

        .parish-news-content a:hover {
            color: #8d442b
        }

.parish-news-permalink {
    display: inline-block;
    margin-top: 1.4rem;
    color: #606a79;
    font-size: .78rem;
    text-underline-offset: 3px
}

.parish-news-archive {
    background: #fff;
    border-top: 1px solid var(--line)
}

.parish-news-archive-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .6rem;
    margin-bottom: .75rem
}

.parish-news-archive-header > div {
    flex: 1 1 min-content;
}

.parish-news-archive-header h2 {
    font-family: var(--slab);
    font-size: var(--section-heading-size);
    color: var(--navy);
    margin: 0;
    scroll-margin-top: 7rem
}

.parish-news-month + .parish-news-month {
    margin-top: 1.75rem
}

.parish-news-month > h3 {
    display: flex;
    align-items: center;
    gap: .85rem;
    font-family: var(--slab);
    font-size: var(--subsection-heading-size);
    color: var(--navy);
    margin: 0 0 .7rem
}

.parish-news-month > h3::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--line)
}

.parish-news-list {
    display: grid;
    gap: .85rem
}

.parish-news-card {
    background: white;
    border: 1px solid var(--line);
    border-top: 3px solid #b1843b;
    border-radius: 6px;
    box-shadow: var(--public-card-shadow);
    overflow: hidden
}

    .parish-news-card > summary {
        list-style: none;
        cursor: pointer;
        display: block;
        padding: 0
    }

        .parish-news-card summary::-webkit-details-marker {
            display: none
        }

        .parish-news-card summary:focus-visible {
            outline: 3px solid #ae7525;
            outline-offset: -4px
        }

@media (hover: hover) {
    .parish-news-card:hover {
        border-top-color: var(--blue)
    }

    .parish-news-card:hover .parish-news-card-header {
        background-color: #f3f9fd
    }
}

@media (hover: hover) and (pointer: fine) {
    .parish-news-card:hover {
        box-shadow: var(--public-card-hover-shadow)
    }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .parish-news-card {
        transition: box-shadow 160ms ease-out, border-top-color 160ms ease-out
    }

    .parish-news-card-header {
        transition: background-color 160ms ease-out
    }
}

.parish-news-card-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1.35rem;
    background-color: #f8f6f1
}

.parish-news-card time {
    display: inline-flex;
    align-items: center;
    gap: .55em
}

.parish-news-card time .icon {
    flex: none;
    color: #80602b
}

.parish-news-card-heading {
    display: grid;
    gap: .55rem;
    overflow-wrap: anywhere
}

.parish-news-card-title {
    font-family: var(--slab);
    font-weight: 700;
    font-size: 1.18rem;
    line-height: 1.4;
    color: var(--navy)
}

.parish-news-summary {
    display: grid;
    padding: 1rem 1.35rem;
    border-top: 1px solid #e8ebef;
    gap: .2rem;
    font-size: .9375rem;
    color: #525e6d;
    line-height: 1.6;
    overflow-wrap: anywhere
}

    .parish-news-summary strong {
        color: #715020
    }

.parish-news-expand {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #aab9ca;
    /* The shared corner policy otherwise makes this indicator square. */
    border-radius: 50% !important;
    color: var(--navy)
}

    .parish-news-expand .icon {
        width: .75rem;
        height: .75rem;
        transform: rotate(90deg)
    }

.parish-news-card[open] .parish-news-expand .icon {
    transform: rotate(-90deg)
}

.parish-news-card[open] .parish-news-summary {
    display: none
}

/* Without script, or until its text has loaded (parish-news.js), an open card keeps its preview. */
.parish-news-card[open]:has([data-news-body]:empty) .parish-news-summary {
    display: grid
}

.parish-news-card-body [data-news-body]:empty {
    display: none
}

.parish-news-body-status {
    margin: 0;
    color: #525e6d
}

/* Newer and older announcements, under an announcement's own page. */
.parish-news-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 1.25rem
}

.parish-news-pager-link {
    display: grid;
    align-content: start;
    gap: .2rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #e4ddd1;
    border-radius: 8px;
    color: var(--navy);
    text-decoration: none
}

    .parish-news-pager-link.is-older {
        grid-column: 2;
        text-align: right
    }

    .parish-news-pager-link:focus-visible {
        outline: 3px solid var(--blue);
        outline-offset: 2px
    }

@media (hover: hover) {
    .parish-news-pager-link:hover {
        border-color: #b1843b
    }
}

.parish-news-pager-label {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #715020
}

.parish-news-pager-title {
    font-family: var(--slab);
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere
}

@media (max-width: 575.98px) {
    .parish-news-pager {
        grid-template-columns: minmax(0, 1fr)
    }

        .parish-news-pager-link.is-older {
            grid-column: auto
        }
}

.parish-news-card-body {
    border-top: 1px solid #e8ebef;
    padding: 1.35rem
}

.parish-news-small-badge {
    color: #715020;
    font-weight: 700
}

.parish-news-lead, .parish-news-card {
    scroll-margin-top: 5.5rem
}

    .parish-news-lead:target, .parish-news-card:target {
        outline: 2px solid #b1843b;
        outline-offset: 3px
    }

.parish-news-connect {
    background: var(--navy);
    color: #e1e5ef;
    border-radius: 8px;
    padding: 1.65rem
}


    .parish-news-connect h2 {
        color: white;
        font-family: var(--slab);
        font-size: var(--section-heading-size);
        margin: .4rem 0 1rem
    }

    .parish-news-connect ul {
        list-style: none;
        padding: 0;
        margin: 0
    }

    .parish-news-connect li {
        border-top: 1px solid #ffffff26
    }

    .parish-news-connect a {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: .5rem;
        color: white;
        font-size: .875rem;
        font-weight: 700;
        text-decoration: none;
        padding: .85rem 0
    }

        .parish-news-connect a span[aria-hidden] {
            color: #c9d1e1
        }

        .parish-news-connect a:hover span:first-child {
            text-decoration: underline dotted;
            text-underline-offset: 3px
        }

.parish-news-empty {
    background: white;
    border: 1px solid var(--line);
    padding: 2rem;
    border-radius: 6px
}

.parish-news-admin-list {
    padding: 0;
    list-style: none
}

    .parish-news-admin-list > li {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        border-bottom: 1px solid var(--line);
        padding-block: 1rem
    }

    .parish-news-admin-list h2 {
        font-size: 1.1rem;
        margin: 0
    }

    .parish-news-admin-list p {
        font-size: .85rem;
        color: #626b78
    }

.parish-news-admin-status {
    background: #e9f5eb;
    padding: 1rem
}

.parish-news-admin textarea {
    font-family: Consolas,monospace
}

.parish-news-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-block: 1rem
}

.parish-news-preview {
    margin-top: 2rem;
    padding: 2rem;
    border: 2px dashed #b1843b;
    background: white
}

@media(max-width:900px) {
    .parish-news-layout {
        grid-template-columns: minmax(0,1fr) 240px;
        gap: 1.25rem
    }

    .parish-news-lead {
        padding: 1.4rem
    }

    .parish-news-connect {
        padding-inline: .75rem
    }
}

@media(max-width:720px) {

    .parish-news-heading {
        align-items: start;
        flex-direction: column;
        gap: .5rem
    }

    .parish-news-layout {
        grid-template-columns: minmax(0,1fr)
    }


    .parish-news-card-header, .parish-news-summary, .parish-news-card-body {
        padding-inline: 1.1rem
    }

    .parish-news-sidebar {
        margin-top: 1rem
    }

    .parish-news-admin-list > li {
        flex-direction: column
    }
}

.parish-news-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: .55rem .75rem;
    margin-bottom: .75rem
}

.parish-news-filters[hidden] {
    display: none
}

    .parish-news-filters > div {
        display: grid;
        gap: .25rem;
        min-width: 0
    }

    .parish-news-filters select {
        width: 8rem;
        max-width: 100%;
        min-height: 44px;
        padding: .5rem 1.8rem .5rem .65rem;
        border: 1px solid #8e98a8;
        background: #f8f9fb url('/images/select-chevron.svg') no-repeat right .55rem center / .85rem;
        color: var(--navy);
        font: inherit;
        font-size: .9rem;
        appearance: none
    }

    .parish-news-filters #news-month {
        width: 9.25rem
    }

    @media (forced-colors: active) {
        .parish-news-filters select {
            appearance: auto;
            background-image: none;
            padding-inline-end: .65rem
        }
    }

    .parish-news-filters select:disabled {
        color: #596476;
        background-color: var(--paper);
        background-image: none;
        padding-inline-end: .65rem
    }

    .parish-news-filters select:focus-visible {
        outline: 2px solid var(--blue);
        outline-offset: 2px
    }

.parish-news-clear {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
    color: var(--blue);
    font-size: .85rem;
    font-weight: 600
}

.parish-news-clear:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px
}

@media (max-width: 767.98px) {
    .parish-news-filters {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr)
    }

    .parish-news-filters select,
    .parish-news-filters #news-month {
        width: 100%
    }

    .parish-news-filters [data-news-apply] {
        grid-column: 1 / -1;
        grid-row: 2
    }
}

.parish-news-chip-filters {
    --ui-control-radius: 999px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(12rem, 14rem);
    align-items: center;
    gap: .65rem;
    padding: .85rem 1rem;
    margin-bottom: .85rem;
    border-block: 1px solid #d8e0e4;
    background: #edf2f3
}

.parish-news-chip-group {
    min-width: 0
}

.parish-news-search {
    --ui-corner-radius: 999px;
    grid-column: -2 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border: 1px solid #b9c5cb;
    background: #fff;
    color: var(--navy)
}

.parish-news-search input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: .35rem 0 .35rem .8rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: .9rem
}

.parish-news-search input:focus {
    outline: 0
}

.parish-news-search input::placeholder {
    color: #596476;
    opacity: 1
}

.parish-news-search:focus-within {
    outline: 2px solid var(--blue);
    outline-offset: 1px
}

.parish-news-search button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer
}

.parish-news-search button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: -3px
}

.parish-news-search button .icon {
    width: 1rem;
    height: 1rem
}

@media (hover: hover) {
    .parish-news-search button:hover {
        background: #e3ebee
    }
}

.parish-news-chip-options {
    display: flex;
    align-items: center;
    gap: .3rem
}

.parish-news-year-chips {
    --ui-corner-radius: 999px;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    background: #f8fafb;
    border: 1px solid #b9c5cb
}

.parish-news-chip,
.parish-news-other-years {
    min-height: 44px;
    padding: .35rem .7rem;
    border: 1px solid #b9c5cb;
    background: #f8fafb;
    color: var(--navy);
    font: 600 .8rem/1.2 var(--font-primary);
    white-space: nowrap
}

.parish-news-chip {
    flex: 0 0 auto;
    min-width: 44px;
    cursor: pointer
}

.parish-news-year-chips .parish-news-chip {
    border-color: transparent;
    background: transparent
}

.parish-news-chip-filters .parish-news-chip[aria-pressed="true"] {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff
}

.parish-news-other-years {
    max-width: 100%;
    border-color: #a48b5d
}

@media (hover: hover) {
    .parish-news-chip-filters .parish-news-chip[aria-pressed="false"]:enabled:hover {
        background: #e3ebee
    }
}

.parish-news-chip:disabled {
    border-color: #d1d9dd;
    color: #596476;
    background: #edf2f3;
    cursor: default
}

.parish-news-chip:focus-visible,
.parish-news-other-years:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 1px
}

.parish-news-month-group:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start
}

.parish-news-month-group:has(.parish-news-month-scroll:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: .3rem
}

.parish-news-month-chips {
    overflow-x: auto;
    padding: 3px;
    margin-block: -3px;
    scrollbar-width: thin
}

.parish-news-month-scroll:not([hidden]) {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #b9c5cb;
    background: #f8fafb;
    color: var(--navy);
    cursor: pointer
}

.parish-news-month-scroll:hover {
    background: #e3ebee
}

.parish-news-month-scroll:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 1px
}

.parish-news-month-scroll.is-reversed .icon {
    transform: rotate(180deg)
}

@media (max-width: 1199.98px) {
    .parish-news-chip-filters {
        grid-template-columns: auto minmax(0, 1fr)
    }

    .parish-news-search {
        grid-column: 1 / -1;
        justify-self: end;
        width: min(100%, 16rem)
    }
}

@media (max-width: 767.98px) {

    .parish-news-chip-filters {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        padding-inline: .75rem
    }

    .parish-news-month-group {
        grid-column: 1 / -1;
        grid-row: 2
    }

    .parish-news-search {
        width: 100%
    }

    .parish-news-search input {
        padding-inline-start: .4rem;
        font-size: .8rem
    }

    .parish-news-chip-options:not(.parish-news-month-chips) {
        flex-wrap: wrap
    }
}

@media (min-width: 480px) and (max-width: 767.98px) {
    .parish-news-chip-filters { grid-template-columns: fit-content(50%) minmax(0, 1fr); }
    .parish-news-chip-filters:has(.parish-news-chip-group:not([hidden])) .parish-news-search {
        grid-column: 2;
        grid-row: 1;
    }
}

@media (forced-colors: active) {
    .parish-news-chip-filters .parish-news-chip[aria-pressed="true"] {
        border-color: Highlight;
        background: Highlight;
        color: HighlightText;
        forced-color-adjust: none
    }
}

.parish-news-feedback:has(#news-status.visually-hidden), .parish-news-feedback:has(#news-status:empty) {
    margin-bottom: 0
}

.parish-news-count {
    overflow-wrap: anywhere;
    color: #596476;
    margin: 0 0 1rem;
    font-size: .9rem;
    line-height: 1.5rem
}

.parish-news-feedback {
    margin-bottom: 1rem
}

    .parish-news-feedback p:empty {
        display: none
    }

    .parish-news-feedback p {
        color: #596476
    }

    .parish-news-feedback button[hidden] {
        display: none
    }

/* Public mobile reading controls; full lead content remains the desktop/no-script default. */
.parish-news-lead-preview, .parish-news-lead-toggle { display: none; }
@media(max-width:767.98px) {
    .parish-news-lead > .parish-news-content[hidden] { display: none; }
    .parish-news-lead-preview:not([hidden]) {
        display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
    }
    .parish-news-lead-preview { margin: 0 0 1rem; color: #596476; font-size: .9375rem; line-height: 1.6; }
    .parish-news-lead-toggle:not([hidden]) { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; margin-top: 1rem; }
    .parish-news-lead-toggle .icon { width: 14px; height: 14px; }
    .parish-news-lead-toggle[aria-expanded="true"] .icon { transform: rotate(-90deg); }
    .parish-news-lead-toggle:not([hidden])[aria-expanded="false"] ~ .parish-news-permalink { display: none; }
}
