/* Static search modal — styled after Ghost's built-in search (sodo-search). */
.ls-search-open,
.ls-search-open body {
    overflow: hidden;
}

.ls-search[hidden] {
    display: none;
}

.ls-search {
    position: fixed;
    inset: 0;
    z-index: 3999999;
    font-family: var(--font-sans, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    -webkit-font-smoothing: antialiased;
}

.ls-search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    animation: ls-fade 0.15s ease-out;
}

.ls-search-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: calc(100% - 32px);
    max-width: 680px;
    max-height: 70vh;
    margin: 8vh auto 0;
    overflow: hidden;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 25px 60px -10px rgba(0, 0, 0, 0.35);
    animation: ls-pop 0.18s ease-out;
}

.ls-search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    height: 64px;
    flex-shrink: 0;
}

.ls-search.has-results .ls-search-header {
    border-bottom: 1px solid #eee;
}

.ls-search-icon {
    display: flex;
    color: #9a9a9a;
}

.ls-search-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    font: inherit;
    font-size: 1.7rem;
    color: #15171a;
    background: transparent;
    border: 0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.ls-search-input::placeholder {
    color: #9a9a9a;
}

.ls-search-input::-webkit-search-cancel-button {
    display: none;
}

.ls-search-cancel {
    padding: 0;
    font: inherit;
    font-size: 1.4rem;
    color: #7c7c7c;
    cursor: pointer;
    background: none;
    border: 0;
}

.ls-search-cancel:hover {
    color: #15171a;
}

.ls-search-results {
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ls-search-results:empty {
    display: none;
}

.ls-search-section {
    margin: 0;
    padding: 18px 20px 6px;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9a9a9a;
}

.ls-search-result {
    display: block;
    padding: 12px 20px;
    color: inherit;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.ls-search-result:last-child {
    margin-bottom: 10px;
}

.ls-search-result:hover,
.ls-search-result.is-active {
    background: #f6f6f6;
    border-left-color: var(--ghost-accent-color, #ff1a75);
    opacity: 1;
}

.ls-search-result-title {
    margin: 0 0 4px;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.35;
    color: #15171a;
}

.ls-search-result-excerpt {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.5;
    color: #6b6b6b;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ls-search mark {
    color: #15171a;
    font-weight: 600;
    background: none;
}

.ls-search-result-title mark {
    color: var(--ghost-accent-color, #ff1a75);
}

.ls-search-empty {
    margin: 0;
    padding: 24px 20px 28px;
    font-size: 1.5rem;
    color: #7c7c7c;
}

@media (max-width: 576px) {
    .ls-search-panel {
        width: 100%;
        max-height: 100%;
        margin-top: 0;
        border-radius: 0 0 10px 10px;
    }

    .ls-search-header {
        padding: 0 16px;
    }

    .ls-search-section,
    .ls-search-result,
    .ls-search-empty {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@keyframes ls-fade {
    from { opacity: 0; }
}

@keyframes ls-pop {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
}
