.dy-search-wrapper {
    position: relative;
    width: 100%;
    font-family: inherit;
}

.dy-search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.dy-search-icon {
    position: absolute;
    left: 16px;
    color: #666;
    pointer-events: none;
}

input[type="search"].dy-header-search-input {
    width: 100%;
    height: 48px;
    padding: 0 40px 0 40px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="search"].dy-header-search-input:focus {
    border-color: #aaa;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    outline: none !important;
    border-style: solid;
}

/* Hide native webkit clear button */
input[type="search"].dy-header-search-input::-webkit-search-cancel-button {
    display: none;
}

.dy-search-clear {
    position: absolute;
    right: 18px;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: color 0.2s;
    outline: none;
    box-shadow: none !important;
}

.dy-search-clear:hover,
.dy-search-clear:focus {
    color: red !important;
    background: transparent !important;
    box-shadow: none !important;
}

.dy-header-search-results-wrapper {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ebebeb;
    border-top: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    border-radius: 6px;
    margin-top: 0;
    overflow: hidden;
    padding: 4px;
}

.dy-header-search-results {
    max-height: 400px;
    overflow-y: auto;
    width: 100%;
}

/* Custom Scrollbar for results */
.dy-header-search-results::-webkit-scrollbar {
    width: 6px;
}

.dy-header-search-results::-webkit-scrollbar-track {
    background: transparent;
    margin: 5px 0;
}

.dy-header-search-results::-webkit-scrollbar-thumb {
    background-color: #d1d1d1;
    border-radius: 10px;
}

.dy-header-search-results::-webkit-scrollbar-thumb:hover {
    background-color: #a8a8a8;
}

.dy-hidden {
    display: none !important;
}

.dy-search-result-item {
    display: block;
    padding: 14px 20px;
    text-decoration: none !important;
    color: #333 !important;
    border-bottom: 1px solid #f4f4f4;
    transition: all 0.25s ease;
    line-height: 1.5;
    font-size: 15px;
}

.dy-search-result-item:last-child {
    border-bottom: none;
}

.dy-search-result-item:hover,
.dy-search-result-item:focus {
    background: #f5f5f5;
    color: #000 !important;
    outline: none !important;
}

.dy-search-result-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    font-size: 15px;
}

.dy-search-count-badge {
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 20px;
    margin-left: 10px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 12px;
    transition: all 0.2s ease;
}

.dy-search-result-item:hover .dy-search-count-badge {
    background: #e6e6e6;
    color: #333;
}

.dy-search-no-results {
    padding: 40px 20px;
    color: #777;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    background: #fcfcfc;
    border-radius: 0 0 6px 6px;
}

.dy-search-related-label {
    padding: 9px 20px;
    color: #666;
    background: #f6f6f6;
    font-size: 12px;
    font-weight: 600;
}

/* Highlighter styles */
mark.dy-highlight {
    background-color: #ffd700;
    color: #000;
    padding: 2px 0;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    font-style: inherit !important;
    line-height: inherit !important;
    text-transform: inherit !important;
    letter-spacing: inherit !important;
}

/* Highlight Navigator */
#dy-search-navigator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 999999;
    font-family: inherit;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

#dy-search-navigator.dy-hidden {
    display: none !important;
}

#dy-nav-back,
#dy-nav-prev,
#dy-nav-next,
#dy-nav-close {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer !important;
    color: #333 !important;
    padding: 5px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 !important;
    transition: color 0.2s !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

#dy-nav-back:hover,
#dy-nav-prev:hover,
#dy-nav-next:hover,
#dy-nav-close:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #007cba !important;
}

#dy-nav-prev:disabled,
#dy-nav-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#dy-nav-count {
    font-weight: bold;
    color: #555;
    min-width: 45px;
    text-align: center;
}

.dy-highlight-active {
    background-color: #ff9800;
    /* Distinct color for active highlight */
    color: #fff;
}