/* publiiLocalSearch — local search plugin styles */

.pls-form {
    position: relative;
    margin: 0;
    width: 100%;
}

.pls-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.9rem;
    font: inherit;
    color: inherit;
    background: transparent;
    border: 1px solid rgba(128, 128, 128, 0.45);
    border-radius: 6px;
    outline: none;
}

.pls-input:focus {
    border-color: rgba(128, 128, 128, 0.9);
}

.pls-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 9999;
    max-height: 60vh;
    overflow-y: auto;
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.pls-item {
    display: block;
    padding: 0.5rem 0.8rem;
    color: inherit;
    text-decoration: none;
}

.pls-item:hover,
.pls-item.is-active {
    background: rgba(0, 0, 0, 0.06);
}

.pls-item-title {
    display: block;
    font-weight: 600;
    line-height: 1.35;
}

.pls-item-snippet {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.85em;
    line-height: 1.35;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pls-empty {
    padding: 0.6rem 0.8rem;
    opacity: 0.7;
}

.pls-dropdown mark,
.pls-results mark {
    background: #ffe58a;
    color: inherit;
    padding: 0;
}

@media (prefers-color-scheme: dark) {
    .pls-dropdown {
        background: #232323;
        color: #eeeeee;
        border-color: rgba(255, 255, 255, 0.18);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    }

    .pls-item:hover,
    .pls-item.is-active {
        background: rgba(255, 255, 255, 0.09);
    }

    .pls-dropdown mark,
    .pls-results mark {
        background: #8a6d00;
        color: inherit;
    }
}

/* search results page */

.pls-searchpage {
    width: 100%;
}

.pls-form--page {
    max-width: 40rem;
}

.pls-input--page {
    font-size: 1.05rem;
    padding: 0.7rem 1rem;
}

.pls-results {
    margin-top: 1.2rem;
}

.pls-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.9rem;
}

.pls-list-item a {
    display: block;
    padding: 0.6rem 0.9rem;
    color: inherit;
    text-decoration: none;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 6px;
}

.pls-list-item a:hover {
    border-color: rgba(128, 128, 128, 0.7);
}

.pls-list-item .pls-item-snippet {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}
