/* Search Bar Component Styles */

.search-container {
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 10001;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box__input {
    width: 100%;
    padding: 12px 16px;
    padding-left: 45px;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box__input:focus {
    border-color: #999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.search-box__input::placeholder {
    color: #999;
}

.search-box__icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    pointer-events: none;
    color: #999;
    z-index: 1;
}

.search-box__icon svg {
    width: 100%;
    height: 100%;
}

.search-suggestions {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
    z-index: 10000;
    /* Max height to show ~9 items (header ~48px + 9 items ~396px = ~444px) to ensure scrollbar appears */
    max-height: 444px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Light scrollbar styling */
.search-suggestions::-webkit-scrollbar {
    width: 8px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Firefox scrollbar styling */
.search-suggestions {
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.search-suggestions.hidden {
    display: none !important;
}

.search-suggestions__header {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-suggestions__count {
    font-weight: 600;
    color: #666;
    margin-left: auto;
    text-decoration: none;
    transition: color 0.15s;
    cursor: pointer;
}

.search-suggestions__count:hover {
    color: #333;
}

.search-suggestions__list {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.search-suggestions__item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.15s;
}

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

.search-suggestions__icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-suggestions__icon svg {
    width: 16px;
    height: 16px;
    color: #fff;
}

.search-suggestions__text {
    font-size: 14px;
    color: #333;
    flex: 1;
}

.icon-red {
    background-color: #c41e3a;
}

.icon-yellow {
    background-color: #f4c430;
}

.icon-brown {
    background-color: #8b4513;
}

.icon-green {
    background-color: #228b22;
}

.icon-pink {
    background-color: #ffc0cb;
}
