/*
 * Homepage hero search: congress suggestions dropdown. Tokens follow the site: navy #333d4c,
 * yellow #fddd01, Nunito. Each row: a start-date card, then the congress, then where it is.
 */

.homePageSearch .hPSField {
    position: relative;
    display: inline-block;
    vertical-align: top;
    width: 570px;
    max-width: calc(100% - 180px);
}

/* The field wrapper is positioned, so it would paint over the search icon that precedes it. */
.homePageSearch .hPSSymbol {
    z-index: 1;
}

.homePageSearch .hPSField .hPSInput {
    width: 100%;
    max-width: 100%;
}

.congressSuggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 20;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    max-height: 440px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 18px 40px rgba(20, 28, 40, .35);
    text-align: left;
    color: #333d4c;
    animation: congressSuggestOpen 120ms ease-out;
}

.congressSuggest[hidden] {
    display: none;
}

@keyframes congressSuggestOpen {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .congressSuggest { animation: none; }
}

.congressSuggestHeading {
    padding: 8px 18px 6px;
    font-size: 13px;
    font-weight: 700;
    color: #333d4c;
}


.congressSuggestEmpty {
    padding: 16px 18px 12px;
    font-size: 14px;
    line-height: 1.45;
    color: #6b7380;
}

.congressSuggestLink {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 150px);
    column-gap: 14px;
    align-items: center;
    padding: 8px 18px;
    color: inherit;
    text-decoration: none;
}

.congressSuggestLink:hover,
.congressSuggestLink:focus {
    color: inherit;
    text-decoration: none;
}


.congressSuggestOption.is-active .congressSuggestLink {
    background: #fffbdb;
}

/* The start-date card: month over day, like a leaf torn off a desk calendar. */
.congressSuggestDate {
    width: 44px;
    padding: 4px 0 5px;
    border-radius: 3px;
    background: #333d4c;
    color: #fff;
    text-align: center;
    line-height: 1;
}

.congressSuggestMonth {
    display: block;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(255, 255, 255, .25);
    font-size: 11px;
    font-weight: 600;
}

.congressSuggestDay {
    display: block;
    padding-top: 4px;
    font-size: 20px;
    font-weight: 800;
}

.congressSuggestOption.is-active .congressSuggestDate {
    background: #fddd01;
    color: #333d4c;
}

.congressSuggestOption.is-active .congressSuggestMonth {
    border-bottom-color: rgba(51, 61, 76, .25);
}

.congressSuggestWhat,
.congressSuggestWhere {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.congressSuggestWhere {
    text-align: right;
}

.congressSuggestTitle,
.congressSuggestName,
.congressSuggestCity,
.congressSuggestCountry {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.congressSuggestTitle {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.congressSuggestName,
.congressSuggestCountry {
    font-size: 13px;
    line-height: 1.4;
    color: #6b7380;
}

.congressSuggestCity {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.congressSuggest mark {
    background: none;
    color: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: #fddd01;
    text-decoration-thickness: 3px;
    text-underline-offset: 2px;
}

.congressSuggestAll {
    margin-top: 4px;
    border-top: 1px solid #eceef1;
}

.congressSuggestAll .congressSuggestLink {
    display: block;
    padding-top: 12px;
    padding-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 767px) {
    .homePageSearch .hPSField {
        width: 100%;
        max-width: 100%;
    }

    .congressSuggest {
        max-height: 60vh;
    }

    /* Place moves under the name: when | what, then where in the second column. */
    .congressSuggestLink {
        grid-template-columns: 44px minmax(0, 1fr);
        grid-template-rows: auto auto;
        row-gap: 1px;
        align-items: start;
        padding: 9px 16px;
    }

    .congressSuggestDate {
        grid-row: 1 / span 2;
    }

    .congressSuggestWhere {
        flex-direction: row;
        gap: 4px;
        text-align: left;
    }

    .congressSuggestCity,
    .congressSuggestCountry {
        font-size: 13px;
        font-weight: 400;
        color: #6b7380;
    }

    .congressSuggestCity::after {
        content: ",";
    }

    .congressSuggestHeading,
    .congressSuggestEmpty {
        padding-left: 16px;
        padding-right: 16px;
    }
}
