.search-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 8px 16px;
    border-bottom: 1px solid #eee;
    z-index: 1000;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin: -8px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
}

.back-arrow:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

/* Style adjustments for the AJAX search in the search page */
.search-input-wrapper .medpro-ajax-search-wrap {
    flex: 1;
    width: 100%;
}

.search-input-wrapper .medpro-search-input-container {
    border-radius: 8px;
}

.search-input-wrapper .medpro-ajax-search-input {
    font-size: 16px;
}

/* Keep this for backward compatibility */
#searchInput {
    width: 100%;
    padding: 8px 36px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

#searchInput:focus {
    border-color: #666;
}

.clear-search {
    position: absolute;
    right: 48px; /* Adjusted to account for the search button */
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s;
    z-index: 10; /* Ensure it's above other elements */
}

.clear-search:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.search-results {
    margin-top: 65px;
    padding: 16px;
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    text-decoration: none;
    color: #333;
    background: #fff;
    margin-bottom: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

.result-title {
    font-size: 16px;
    margin-right: 16px;
}

.search-loading,
.no-results,
.search-error {
    text-align: center;
    color: #666;
    padding: 24px;
    font-size: 16px;
}

.search-error {
    color: #dc3545;
}

/* Autocomplete styles */
.ui-autocomplete {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 8px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 1000;
}

.ui-autocomplete .ui-menu-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.search-suggestion:hover {
    background-color: #f5f5f5;
}

.suggestion-title {
    font-size: 16px;
    color: #333;
    margin-right: 16px;
}

.suggestion-arrow {
    flex-shrink: 0;
}
