/**
 * Live search dropdown — sits inside .search-popup .search-inner
 * (partials/header.php). Kept in its own file so it's easy to find/update
 * independently of the theme's bundled style.css.
 */

.site-search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 5;
    max-height: 380px;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    text-align: left;
}

.site-search-result {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 20px;
    border-bottom: 1px solid #eef0ef;
    text-decoration: none;
    transition: background-color 150ms ease;
}

.site-search-result:last-child {
    border-bottom: none;
}

.site-search-result:hover,
.site-search-result:focus,
.site-search-result.is-active {
    background-color: #f4faf9;
    outline: none;
}

.site-search-result-type {
    display: inline-block;
    align-self: flex-start;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #0d7d72;
    background: rgba(47, 231, 217, 0.18);
    padding: 2px 8px;
    border-radius: 4px;
}

.site-search-result-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.35;
}

.site-search-result-excerpt {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-search-result mark {
    background: rgba(47, 231, 217, 0.45);
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

.site-search-empty {
    padding: 18px 20px;
    font-size: 14px;
    color: #6b7280;
    text-align: center;
}

/* Tablet / mobile: the popup itself already goes full-width, just tighten
   the dropdown's own padding a touch and cap its height so it never pushes
   below the viewport on short screens. */
@media only screen and (max-width: 767px) {
    .site-search-results {
        max-height: 60vh;
    }

    .site-search-result {
        padding: 12px 16px;
    }
}
