/* Shared live search, including the reference homepage that bypasses wp_footer. */
html.jd-search-open {
    overflow: hidden
}
.jd-search-overlay[hidden] {
    display: none !important
}
.jd-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000010;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 44px 20px 28px;
    overflow-y: auto;
    background: rgba(0, 0, 0, .79);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    direction: ltr;
    color: #eee
}
.jd-search-dialog {
    width: 840px;
    max-width: 100%;
    padding: 10px 20px 20px;
    background: #0b0b0c;
    border: 1px solid #2a2a2c;
    border-radius: 28px;
    box-shadow: 0 24px 80px #0005;
    text-align: left;
    font-family: inherit;
    font-size: 17px;
    line-height: 1.4;
    outline: 0
}
.jd-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 -10px 18px
}
.jd-search-field {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    height: 64px;
    padding: 0 24px;
    border: 1px solid #303033;
    border-radius: 40px;
    background: #0b0b0c;
    transition: box-shadow .15s
}
.jd-search-field:focus-within {
    box-shadow: 0 0 0 2px #ffa50040
}
.jd-search-field > svg {
    width: 23px;
    height: 23px;
    flex: none;
    color: #aaa
}
.jd-search-field input {
    flex: 1;
    width: 100%;
    min-width: 0;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0;
    padding: 0;
    background: transparent !important;
    color: #eee !important;
    font-family: inherit;
    font-weight: 400;
    font-size: 20px;
    line-height: 1.4;
    outline: 0
}
.jd-search-field input::placeholder {
    color: #a1a1a5;
    opacity: 1
}
.jd-search-field input::-webkit-search-cancel-button {
    display: none
}
.jd-search-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 60px;
    height: 60px;
    border: 1px solid #222;
    border-radius: 50%;
    background: #181819;
    color: #aaa;
    cursor: pointer;
    padding: 0
}
.jd-search-close:hover {
    background: #28282b;
    color: white
}
.jd-search-dialog h2 {
    margin: 0 6px 16px;
    color: #ffa500;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0
}
.jd-search-status {
    margin: 0 6px;
    color: #aaa;
    font-size: 15px
}
.jd-search-status:empty {
    display: none
}
.jd-search-status:not(:empty) {
    padding: 8px 0 16px
}
.jd-search-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100dvh - 210px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent
}
.jd-search-result {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 112px;
    padding: 10px;
    border: 1px solid #29292c;
    border-radius: 28px;
    background: #0b0b0c;
    color: #eee;
    text-decoration: none;
    transition: background .15s, color .15s
}
.jd-search-result:hover, .jd-search-result:focus-visible {
    background: #141415;
    color: #ffa500
}
.jd-search-result img {
    display: block;
    flex: none;
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 13px;
    background: #1f1f21
}
.jd-search-result-text {
    flex: 1;
    min-width: 0
}
.jd-search-result small {
    display: block;
    margin-bottom: 4px;
    color: #999;
    font-size: 12px;
    font-weight: 500
}
.jd-search-result strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 500
}
.jd-search-result > svg {
    width: 18px;
    height: 18px;
    flex: none;
    margin: 0 2px 0 8px;
    color: #999
}
.jd-search-result:hover > svg, .jd-search-result:focus-visible > svg {
    color: #ffa500
}
.jd-search-close:focus-visible, .jd-search-result:focus-visible {
    outline: 2px solid #ffa500;
    outline-offset: -3px
}
button.series-nav-search {
    color: #aaa;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400
}
button.series-nav-search span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}
button.series-nav-search:hover, button.series-nav-search:focus-visible {
    border-color: var(--jade-primary);
    outline: 1px solid var(--jade-primary)
}
.jd-global-search > svg {
    width: 20px;
    height: 20px
}
@media (max-width: 600px) {
    .jd-search-overlay {
        padding: 16px 10px
    }

    .jd-search-dialog {
        padding: 10px 12px 14px;
        border-radius: 22px
    }

    .jd-search-form {
        margin: 0 -4px 16px;
        gap: 8px
    }

    .jd-search-field {
        height: 52px;
        padding: 0 14px;
        gap: 9px
    }

    .jd-search-field input {
        font-size: 16px
    }

    .jd-search-close {
        width: 46px;
        height: 46px
    }

    .jd-search-dialog h2 {
        font-size: 16px;
        margin: 0 3px 12px
    }

    .jd-search-results {
        max-height: calc(100dvh - 155px);
        gap: 8px
    }

    .jd-search-result {
        gap: 12px;
        min-height: 96px;
        padding: 8px;
        border-radius: 20px
    }

    .jd-search-result img {
        width: 50px;
        height: 76px;
        border-radius: 10px
    }

    .jd-search-result strong {
        font-size: 15px
    }

    .jd-search-result small {
        font-size: 11px
    }

    .jd-search-result > svg {
        margin-left: 0
    }
}
.jd-search-field > .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0
}
@media (max-width: 600px) {
    button.series-nav-search {
        font-size: 12px
    }
}
.jd-search-field input:focus-visible {
    outline: none
}

.jd-search-field:focus-within {
    border-color: var(--jade-primary);
    box-shadow: 0 0 0 2px rgba(var(--jade-glow-rgb), 0.1255)
}
.jd-search-field input:focus, .jd-search-field input:focus-visible {
    outline: none !important;
    box-shadow: none !important
}
