/* Atlas of Lives — global archive search. Isolated from app.css. */
.nav-search-button {
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border: 1px solid var(--line, #d9ded8);
    border-radius: 999px;
    color: var(--forest, #234d43) !important;
    background: rgba(255,255,255,.72);
    text-decoration: none;
    overflow: hidden;
}
.nav-search-button:hover,
.nav-search-button:focus-visible,
.nav-search-button.is-active {
    background: var(--forest, #234d43);
    border-color: var(--forest, #234d43);
    color: #fff !important;
}
.nav-search-icon {
    position: relative;
    width: 17px;
    height: 17px;
    display: block;
}
.nav-search-icon::before {
    content: "";
    position: absolute;
    left: 1px;
    top: 1px;
    width: 10px;
    height: 10px;
    border: 2px solid currentColor;
    border-radius: 50%;
    box-sizing: border-box;
}
.nav-search-icon::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 2px;
    right: 0;
    bottom: 2px;
    border-radius: 99px;
    background: currentColor;
    transform: rotate(45deg);
    transform-origin: center;
}

.archive-search-layout,
.archive-search-main,
.archive-search-results,
.archive-search-list {
    min-width: 0;
    max-width: 100%;
}
.archive-search-main { overflow: hidden; }
.archive-search-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.25rem;
    margin-bottom: 1.35rem;
}
.archive-search-heading > div { min-width: 0; }
.archive-search-heading h1 {
    max-width: 850px;
    font-size: clamp(2.45rem, 4.6vw, 4.45rem);
    line-height: 1;
    margin: .45rem 0 .72rem;
}
.archive-search-heading p {
    max-width: 760px;
    color: var(--muted, #687771);
}
.archive-search-private {
    flex: 0 0 auto;
    border: 1px solid var(--line, #d9ded8);
    border-radius: 999px;
    padding: .58rem .82rem;
    font-size: .82rem;
    font-weight: 750;
    color: var(--forest, #234d43);
    background: rgba(255,255,255,.72);
}

.archive-search-form {
    width: 100%;
    min-width: 0;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.archive-search-form label,
.archive-search-form label > span { font-weight: 700; }
.archive-search-query { display: block; min-width: 0; }
.archive-search-input-wrap {
    position: relative;
    min-width: 0;
    margin-top: .5rem;
}
.archive-search-input-wrap svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    color: var(--muted, #687771);
    pointer-events: none;
}
.archive-search-input-wrap input {
    width: 100%;
    min-width: 0;
    min-height: 56px;
    padding-left: 3rem;
    font-size: 1.02rem;
}
.archive-search-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .8rem;
    margin-top: 1rem;
}
.archive-search-filter-grid label,
.archive-search-filter-grid select {
    min-width: 0;
    width: 100%;
}
.archive-search-filter-grid select { margin-top: .42rem; }
.archive-search-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1rem;
}

.archive-search-results-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .85rem;
}
.archive-search-results-header h2 {
    margin: .3rem 0 0;
    font-size: clamp(1.75rem, 3vw, 2.45rem);
}
.archive-search-results-header > span {
    flex: 0 0 auto;
    color: var(--muted, #687771);
}

/* Result-type controls wrap cleanly; no horizontal scrollbar. Empty types are hidden in PHP. */
.archive-search-type-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    width: 100%;
    min-width: 0;
    margin: 0 0 .85rem;
    padding: 0;
    overflow: visible;
}
.archive-search-type-pills a {
    width: auto;
    min-width: 150px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    padding: .48rem .62rem .48rem .78rem;
    border: 1px solid var(--line, #d9ded8);
    border-radius: 14px;
    background: rgba(255,255,255,.72);
    color: var(--forest, #234d43);
    font-size: .84rem;
    font-weight: 750;
    text-decoration: none;
}
.archive-search-type-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.archive-search-type-count {
    width: 1.55rem;
    height: 1.55rem;
    flex: 0 0 1.55rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(35,77,67,.09);
    font-size: .75rem;
}
.archive-search-type-pills a:hover { border-color: var(--forest, #234d43); }
.archive-search-type-pills a.is-active {
    color: #fff;
    background: var(--forest, #234d43);
    border-color: var(--forest, #234d43);
}
.archive-search-type-pills a.is-active .archive-search-type-count {
    background: rgba(255,255,255,.18);
}

.archive-search-list {
    display: grid;
    gap: .7rem;
    width: min(100%, 900px);
}
.archive-search-result {
    width: 100%;
    max-width: 900px;
    min-width: 0;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: start;
    gap: .75rem;
    padding: .78rem .9rem;
    overflow: hidden;
}
.archive-search-result-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--mist, #e7f0eb);
    color: var(--forest, #234d43);
    font-weight: 900;
}
.archive-search-result-copy { min-width: 0; overflow: hidden; }
.archive-search-result-topline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem .6rem;
    color: var(--forest, #234d43);
}
.archive-search-result-topline > span {
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .7rem;
    font-weight: 850;
}
.archive-search-result-topline small { color: var(--muted, #687771); }
.archive-search-result h3 {
    max-width: 100%;
    margin: .28rem 0 .38rem;
    font-size: clamp(1.02rem, 1.6vw, 1.22rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.archive-search-result h3 a { color: inherit; text-decoration: none; }
.archive-search-result h3 a:hover { text-decoration: underline; }
.archive-search-result p {
    max-width: 100%;
    margin: 0;
    color: var(--muted, #687771);
    line-height: 1.42;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.archive-search-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .36rem;
    margin-top: .62rem;
}
.archive-search-meta span {
    max-width: 100%;
    padding: .3rem .52rem;
    border-radius: 999px;
    background: var(--mist, #eef4f0);
    color: var(--forest, #234d43);
    font-size: .74rem;
    overflow-wrap: anywhere;
}
.archive-search-open {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--forest, #234d43);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    padding-top: .22rem;
}
.archive-search-transcript {
    max-width: 100%;
    margin-top: .7rem;
    padding: .72rem;
    border-radius: 14px;
    background: #f4f7f5;
    overflow: hidden;
}
.archive-search-transcript strong {
    display: block;
    margin-bottom: .25rem;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.archive-search-transcript p { margin: 0; }
.archive-search-empty { text-align: center; padding: 2.2rem 1rem; }
.archive-search-empty > span { display: block; font-size: 2rem; color: var(--forest, #234d43); }
.archive-search-empty h3 { margin: .55rem 0 .3rem; }
.archive-search-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.2rem;
}
.archive-search-start-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem;
}
.archive-search-start-grid .card { padding: 1rem; }
.archive-search-start-grid strong { display: block; margin-bottom: .35rem; color: var(--forest, #234d43); }
.archive-search-start-grid p { color: var(--muted, #687771); }

@media (max-width: 1100px) {
    .archive-search-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .archive-search-start-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .archive-search-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .archive-search-filter-grid { grid-template-columns: 1fr; }
    .archive-search-results-header {
        align-items: flex-start;
        flex-direction: column;
        gap: .35rem;
    }
   .archive-search-type-pills {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .archive-search-result {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: .7rem;
    }
    .archive-search-result-mark { width: 36px; height: 36px; }
    .archive-search-open {
        grid-column: 2;
        width: fit-content;
        padding-top: 0;
    }
    .archive-search-actions { flex-direction: column; }
    .archive-search-actions .button { width: 100%; }
}
@media (max-width: 520px) {
    .nav-search-button { width: 38px; height: 38px; flex-basis: 38px; }
    .archive-search-form { padding: 1rem; }
   .archive-search-type-pills { grid-template-columns: 1fr; }
    .archive-search-result { padding: .85rem; }
}

/* Compact result cards: keep search results readable instead of stretching across the dashboard. */
@media (min-width: 761px) {
    .archive-search-open { align-self: center; }
}


/* Live archive suggestions shown while the member types. */
.archive-search-input-wrap {
    z-index: 30;
}
.archive-search-suggestions[hidden] {
    display: none !important;
}
.archive-search-suggestions {
    position: absolute;
    top: calc(100% + .45rem);
    left: 0;
    right: 0;
    z-index: 80;
    max-height: min(420px, 62vh);
    overflow-y: auto;
    padding: .4rem;
    border: 1px solid var(--line, #d9ded8);
    border-radius: 18px;
    background: rgba(255, 253, 248, .99);
    box-shadow: 0 18px 45px rgba(22, 45, 39, .18);
}
.archive-search-suggestion {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
    min-width: 0;
    padding: .68rem .72rem;
    border-radius: 13px;
    color: var(--ink, #152823);
    text-decoration: none;
}
.archive-search-suggestion:hover,
.archive-search-suggestion.is-active {
    background: var(--mist, #e7f0eb);
}
.archive-search-suggestion-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(35, 77, 67, .1);
    color: var(--forest, #234d43);
    font-weight: 900;
}
.archive-search-suggestion-copy {
    min-width: 0;
    display: grid;
    gap: .1rem;
}
.archive-search-suggestion-copy strong,
.archive-search-suggestion-copy small,
.archive-search-suggestion-meta {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.archive-search-suggestion-copy strong {
    font-size: .94rem;
    line-height: 1.25;
}
.archive-search-suggestion-copy small {
    color: var(--muted, #687771);
    font-size: .79rem;
}
.archive-search-suggestion-meta {
    color: var(--forest, #234d43);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.archive-search-suggestion-arrow {
    color: var(--forest, #234d43);
    font-weight: 850;
}
.archive-search-suggestion-all {
    width: 100%;
    margin-top: .25rem;
    padding: .72rem .8rem;
    border: 0;
    border-top: 1px solid var(--line, #d9ded8);
    background: transparent;
    color: var(--forest, #234d43);
    text-align: left;
    font: inherit;
    font-size: .86rem;
    font-weight: 800;
    cursor: pointer;
}
.archive-search-suggestion-all:hover,
.archive-search-suggestion-all:focus-visible {
    background: rgba(35, 77, 67, .06);
}

@media (max-width: 700px) {
    .archive-search-suggestions {
        max-height: 52vh;
        border-radius: 15px;
    }
    .archive-search-suggestion {
        grid-template-columns: 32px minmax(0, 1fr);
        padding: .62rem;
    }
    .archive-search-suggestion-mark {
        width: 30px;
        height: 30px;
    }
    .archive-search-suggestion-arrow {
        display: none;
    }
}
