/* ============================================================
   site-search.css
   1. Search button in the header, to the right of the TikTok icon
   2. Pagefind search results styling for search.htm
   ============================================================ */

/* ===== 1. Header search button ===== */
.navbar-social-icons li.navbar-search-item {
    margin-left: 1.2em;
    padding-left: 1.2em;
    border-left: 1px solid #c8c8c8;
    vertical-align: middle;
}

.navbar-social-icons li a.navbar-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #c0392b;
    color: #fff;
    font-size: 16px;
    line-height: 1;
    vertical-align: middle;
}

.navbar-social-icons li a.navbar-search-btn:hover,
.navbar-social-icons li a.navbar-search-btn:focus {
    background-color: #a93226;
    color: #fff;
    text-decoration: none;
}

.navbar-social-icons li a.navbar-search-btn i {
    color: #fff;
}

@media (max-width: 576px) {
    .navbar-social-icons li.navbar-search-item {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }
    .navbar-social-icons li a.navbar-search-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* ===== 2. Search results page ===== */
/* Compact hero with a dark-to-red gradient instead of a photo,
   so the search box is visible without scrolling */
.hero-section.hero-search {
    background-image: linear-gradient(135deg, #1a1a1a 0%, #2b2b2b 55%, #7a1010 100%);
    padding: 36px 0;
}

.hero-section.hero-search .hero-overlay {
    display: none;
}

.hero-section.hero-search .hero-content {
    padding: 22px 30px;
    max-width: 760px;
}

.hero-section.hero-search .hero-subtitle {
    margin-bottom: 12px;
}

.hero-section.hero-search .hero-title {
    font-size: 40px;
    margin-bottom: 0;
    padding: 8px 0;
}

@media (max-width: 768px) {
    .hero-section.hero-search {
        padding: 20px 0;
    }
    .hero-section.hero-search .hero-content {
        padding: 18px 16px;
        margin: 0 12px;
    }
    .hero-section.hero-search .hero-title {
        font-size: 28px;
    }
}

.site-search-wrap {
    max-width: 860px;
    margin: 10px auto 50px;
}

.site-search-wrap .pagefind-ui {
    --pagefind-ui-scale: 1;
    --pagefind-ui-primary: #c0392b;
    --pagefind-ui-text: #333;
    --pagefind-ui-background: #fff;
    --pagefind-ui-border: #c8c8c8;
    --pagefind-ui-tag: #f2f2f2;
    --pagefind-ui-border-width: 1px;
    --pagefind-ui-border-radius: 6px;
    --pagefind-ui-font: "Open Sans", Arial, sans-serif;
}

.site-search-wrap .pagefind-ui__search-input {
    font-weight: 400;
}

.site-search-wrap .pagefind-ui__result-link {
    color: #a00;
    font-weight: 600;
}

.site-search-wrap .pagefind-ui__result-link:hover {
    color: #c0392b;
}

.site-search-wrap .pagefind-ui__result-excerpt mark {
    background-color: #F8CA00;
    color: #000;
    padding: 0 2px;
}

.site-search-wrap .pagefind-ui__button {
    background-color: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

.site-search-help {
    text-align: center;
    color: #555;
    font-size: 15px;
    margin: 0 auto 20px;
}

/* ===== Machine type buttons (replace the filter sidebar) ===== */
.site-search-wrap .pagefind-ui__filter-panel {
    display: none !important;
}

.site-search-wrap .pagefind-ui__drawer {
    display: block !important;
}

.site-search-wrap .pagefind-ui__results-area {
    width: 100%;
    min-width: 0;
    margin-left: 0;
}

.search-type-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 4px;
}

.search-type-btn {
    background: #fff;
    border: 1px solid #c8c8c8;
    border-radius: 20px;
    color: #333;
    cursor: pointer;
    font-family: "Open Sans", Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    padding: 7px 18px;
    transition: all 0.2s ease;
}

.search-type-btn:hover,
.search-type-btn:focus {
    border-color: #c0392b;
    color: #c0392b;
    outline: none;
}

.search-type-btn.is-active {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

@media (max-width: 576px) {
    .search-type-bar {
        gap: 6px;
    }
    .search-type-btn {
        font-size: 13px;
        padding: 6px 11px;
    }
}

/* ===== Spelling suggestions ("Did you mean...?") ===== */
.search-correction {
    margin: 14px 0 0;
    font-size: 15px;
    color: #333;
}

.search-correction:empty {
    display: none;
}

.search-correction a {
    color: #a00;
    font-weight: 600;
    text-decoration: underline;
}

.search-correction a:hover {
    color: #c0392b;
}
