/* SCCC presentation only; QueryVale owns retrieval and accessible interactions. */
.sccc-queryvale-no-script {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: calc(100% - 32px);
    max-width: 640px;
    margin: 16px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sccc-queryvale-no-script label {
    flex-basis: 100%;
}

.sccc-queryvale-no-script input[type="search"] {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 8px;
    border: 1px solid #666;
    border-radius: 4px;
}

.sccc-queryvale-no-script button {
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid #666;
    border-radius: 4px;
    background: #ffe268;
    color: #141414;
    cursor: pointer;
}

.sccc-queryvale-no-script input:focus-visible,
.sccc-queryvale-no-script button:focus-visible {
    outline: 2px solid #141414;
    outline-offset: 2px;
}

.form-search form[data-qv-search] {
    position: relative;
    width: 315px;
    max-width: 100%;
}

.form-search form[data-qv-search] label,
.form-search form[data-qv-search] input[type="text"] {
    width: 100%;
}

.form-search form[data-qv-search] input[type="text"] {
    box-sizing: border-box;
    height: 32px;
    padding-left: 28px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}

.form-search form[data-qv-search] label::before {
    content: "\f002";
    position: absolute;
    top: 50%;
    left: 11px;
    transform: translateY(-50%);
    color: #444;
    font-family: "Font Awesome 5 Free";
    font-size: 14px;
    font-weight: 900;
    pointer-events: none;
    z-index: 1;
}

.form-search form[data-qv-search] label::after {
    content: none;
}

.sccc-queryvale-submit {
    position: absolute;
    top: 0;
    right: 0;
    width: 35px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ccc;
    cursor: pointer;
}

.sccc-queryvale-submit::before {
    content: "\f002";
    font-family: "Font Awesome 5 Free";
    font-size: 20px;
    font-weight: 900;
}

.sccc-queryvale-submit:focus-visible {
    outline: 2px solid #2684e8;
    outline-offset: 2px;
}

.sccc-queryvale-suggestions {
    /* The SCCC label retains its 8px bottom margin; meet the input edge. */
    top: calc(100% - 7px);
    width: 100%;
    max-height: min(70vh, 680px);
    border: 1px solid #d7dce2;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: left;
    z-index: 1000000;
}

.sccc-queryvale-suggestions[hidden] {
    display: none;
}

.sccc-queryvale-suggestions .qv-search__suggestion {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 54px;
    padding: 10px 18px 10px 28px;
    border-bottom: 1px solid #e5e9ef;
    text-align: left;
}

@media (prefers-reduced-motion: no-preference) {
    .sccc-queryvale-suggestions .qv-search__suggestion {
        transition: background-color 0.3s;
    }
}

.sccc-queryvale-suggestions .qv-search__suggestion-copy,
.sccc-queryvale-suggestions .qv-search__suggestion-title,
.sccc-queryvale-suggestions .qv-search__suggestion-excerpt,
.sccc-queryvale-suggestions .qv-search__suggestion-type {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sccc-queryvale-suggestions .qv-search__suggestion:last-child {
    border-bottom: 0;
}

.sccc-queryvale-suggestions .qv-search__suggestion-title {
    color: #d00065;
    font-size: 13px;
    line-height: 18px;
}

.sccc-queryvale-suggestions .qv-search__suggestion-type {
    color: #52657b;
    font-size: 11px;
    line-height: 16px;
}

.sccc-queryvale-suggestions .qv-search__suggestion-excerpt {
    color: #52657b;
    font-size: 11px;
    line-height: 16px;
}

@media (max-width: 40rem) {
    .form-search form[data-qv-search] {
        width: 100%;
    }
}

.qv-popup {
    width: min(40rem, calc(100vw - 2rem));
    height: 80dvh;
    max-height: 80dvh;
    margin: 8dvh auto 0;
    border: 0;
    border-radius: 7px;
    font-family: inherit;
    overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
    .qv-popup[open] {
        animation: sccc-qv-popup-fade-in 0.5s ease-in-out;
    }
}

@keyframes sccc-qv-popup-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.qv-popup::backdrop {
    background: rgba(0, 0, 0, 0.46);
}

.qv-popup__header {
    position: relative;
    height: 50px;
    padding: 0 1rem;
    border-bottom: 1px solid #dce0e5;
    background: #f9fafb;
}

.qv-popup__header:focus-within {
    border-bottom: 3px solid #4cb9ff;
}

.qv-popup__heading[hidden] {
    display: none;
}

.sccc-qv-popup-search {
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
    height: 100%;
    padding-right: 40px;
}

.sccc-qv-popup-search__icon::before {
    content: "\f002";
    font-family: "Font Awesome 5 Free";
    font-size: 14px;
    font-weight: 900;
    color: #3b454f;
}

.sccc-qv-popup-search__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 0.75rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: #3b454f;
    font: inherit;
    font-size: 15px;
}

.sccc-qv-popup-search__input::-webkit-search-cancel-button {
    display: none;
}

.qv-popup__close {
    position: absolute;
    top: 8px;
    right: 6px;
    min-width: 32px;
    width: 32px;
    min-height: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: transparent;
    font-size: 0;
}

.qv-popup__close::before {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    box-sizing: border-box;
    width: 16px;
    height: 16px;
    border: 1px solid #6f7881;
    border-radius: 50%;
}

.qv-popup__close::after {
    content: "";
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    background:
        linear-gradient(45deg, transparent 43%, #6f7881 43% 57%, transparent 57%),
        linear-gradient(-45deg, transparent 43%, #6f7881 43% 57%, transparent 57%);
}

.qv-popup__close:focus-visible {
    outline: 2px solid #2684e8;
    outline-offset: 2px;
}

.sccc-qv-popup-search__input:focus-visible {
    outline: 0;
}

.qv-popup__shell {
    height: 100%;
}

.qv-popup__results {
    flex: 1;
    min-height: 0;
    padding: 0 2rem;
}

.qv-popup__footer {
    min-height: 49px;
    padding: 0 1rem;
    background: #f9fafb;
}

.qv-popup__result-title {
    display: block;
    overflow: hidden;
    color: #d00065;
    font-size: 16px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qv-popup__excerpt,
.qv-popup__count {
    color: #52657b;
}

.qv-popup__result {
    padding: 12px 0;
}

.qv-popup__excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin: 2px 0 0;
    font-size: 13px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.qv-popup__count {
    font-size: 12px;
}

.qv-popup__pages button {
    min-width: 32px;
    min-height: 32px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #0965bd;
    font-size: 15px;
}

.qv-popup__pages button[aria-current="page"] {
    color: #52657b;
}

.qv-popup__fallback {
    display: none;
}

.qv-popup.sccc-qv-popup--unavailable .qv-popup__fallback {
    display: inline;
}

@media (max-width: 40rem) {
    .qv-popup {
        width: calc(100vw - 1rem);
        height: 88dvh;
        max-height: 88dvh;
        margin-top: 4dvh;
    }

    .qv-popup__results {
        padding: 0 1rem;
    }
}
