.hh-header-search-form,
.hh-header-search-field,
.hh-header-search-control {
    margin: 0;
}

.hh-header-search-shell {
    display: flex;
    align-items: center;
}

.hh-header-search {
    position: relative;
}

.hh-header-search .hh-header-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 40px;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    background: #f8f8f8 !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.hh-header-search .hh-header-search-input-wrap:focus-within {
    border-color: #b24718 !important;
    background: #fff !important;
}

.hh-header-search .hh-header-search-submit,
.hh-header-search button.hh-header-search-submit,
button.hh-header-search-submit[type="submit"] {
    flex: 0 0 auto;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    margin: 2px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    color: #666 !important;
    cursor: pointer;
    font-size: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s, color 0.2s;
    box-shadow: none !important;
    line-height: 1 !important;
}

.hh-header-search .hh-header-search-submit:hover,
.hh-header-search button.hh-header-search-submit:hover {
    background: rgba(0,0,0,0.05) !important;
    background-color: rgba(0,0,0,0.05) !important;
    color: #333 !important;
}

.hh-header-search .hh-header-search-submit span,
.hh-header-search button.hh-header-search-submit span {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.hh-header-search .hh-header-search-submit::before,
.hh-header-search button.hh-header-search-submit::before {
    content: '' !important;
    display: block !important;
    width: 14px !important;
    height: 14px !important;
    border: 2px solid currentColor !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
    transform: translate(-2px, -2px) !important;
    box-shadow: 4px 4px 0 -3px currentColor !important;
    background: transparent !important;
}

.hh-header-search-input {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 36px 0 0;
    border: 0 !important;
    background: transparent !important;
    color: #333;
    font-size: 14px;
    outline: none !important;
    box-shadow: none !important;
}

.hh-header-search-input::placeholder {
    color: #7b8794;
}

.hh-header-search-title {
    display: none;
}

.hh-header-search-clear {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(24, 35, 47, 0.08);
    color: #314154;
    cursor: pointer;
    transform: translateY(-50%);
}

.hh-header-search-clear::before,
.hh-header-search-clear::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 1.5px;
    background: currentColor;
}

.hh-header-search-clear::before {
    transform: rotate(45deg);
}

.hh-header-search-clear::after {
    transform: rotate(-45deg);
}

.hh-header-search-clear.is-visible {
    display: inline-flex;
}

/* Main search container */
.hh-header-search {
    flex: 0 0 auto;
    min-width: 220px;
    max-width: 320px;
}

/* Hide title on desktop */
.hh-header-search > .hh-header-search-title {
    display: none !important;
}

.hh-header-search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 60;
    display: none;
    max-height: min(72vh, 620px);
    overflow-y: auto;
    border: 1px solid rgba(19, 31, 43, 0.12);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 22px 54px rgba(19, 31, 43, 0.18);
}

.hh-header-search-results.is-visible {
    display: block;
}

.hh-header-search-panel {
    padding: 6px 0;
}

.hh-header-search-state {
    padding: 18px 20px;
    color: #425466;
    font-size: 14px;
}

.hh-header-search-group + .hh-header-search-group,
.hh-header-search-footer {
    border-top: 1px solid rgba(19, 31, 43, 0.08);
}

.hh-header-search-group-header {
    padding: 14px 20px 8px;
    color: #7b8794;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hh-header-search-list {
    list-style: none;
    margin: 0;
    padding: 0 10px 10px;
}

.hh-header-search-list li {
    margin: 0;
}

.hh-header-search-link {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 10px;
    border-radius: 14px;
    text-decoration: none;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.hh-header-search-link:hover,
.hh-header-search-link:focus-visible {
    background: #f6f8fb;
    transform: translateY(-1px);
    outline: none;
}

.hh-header-search-thumb,
.hh-header-search-thumb-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    background: linear-gradient(135deg, #ece7df, #f7f4ef);
}

.hh-header-search-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a7661;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.hh-header-search-text {
    min-width: 0;
}

.hh-header-search-title {
    display: block;
    color: #18232f;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.hh-header-search-meta {
    display: block;
    margin-top: 4px;
    color: #6b7785;
    font-size: 12px;
    line-height: 1.5;
}

.hh-header-search-type {
    display: inline-flex;
    margin-top: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f0e6dc;
    color: #8b4b25;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hh-header-search-footer-link {
    display: block;
    padding: 14px 20px 16px;
    color: #b24718;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.hh-header-search-footer-link:hover,
.hh-header-search-footer-link:focus-visible {
    background: #fff7f1;
    outline: none;
}

@media (max-width: 767px) {
    .hh-header-search-results {
        position: fixed;
        top: 88px;
        left: 12px;
        right: 12px;
        max-height: calc(100vh - 112px);
    }

    .hh-header-search-link {
        grid-template-columns: 60px minmax(0, 1fr);
    }

    .hh-header-search-thumb,
    .hh-header-search-thumb-placeholder {
        width: 60px;
        height: 60px;
    }
}

/* Popular Keywords / Suggestions */
.hh-header-search-suggestions {
    min-width: 280px;
}

.hh-header-search-suggestions-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px 10px;
    color: #666;
    font-size: 13px;
    font-weight: 600;
}

.hh-search-trending-icon {
    color: #b24718;
}

.hh-header-search-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 16px 16px;
}

.hh-header-search-keyword {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.hh-header-search-keyword:hover {
    background: #b24718;
    border-color: #b24718;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(178, 71, 24, 0.25);
}

.hh-header-search-keyword:active {
    transform: translateY(0);
}

@media (max-width: 767px) {
    .hh-header-search-suggestions {
        min-width: auto;
    }
    
    .hh-header-search-keyword {
        padding: 6px 12px;
        font-size: 12px;
    }
}