/* Search Form Base Styles */
.search-form {
    position: relative;
    width: 100%;
}

.search-form__wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

.search-form__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.search-form__input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background-color: #fff;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form__input:focus {
    outline: none;
    border-color: #F4551E;
    box-shadow: 0 0 0 3px rgba(244, 85, 30, 0.1);
}

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


.search-form__icon {
    display: block;
}

/* Search Results */
.search-form__results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 500px;
    overflow-y: auto;
    display: none;
}

.search-form__results:not(:empty) {
    display: block;
}

.search-form__results-content {
    padding: 12px 0;
}

.search-form__section {
    padding: 0;
}

.search-form__section:not(:last-child) {
    border-bottom: 1px solid #eee;
}

.search-form__section-title {
    margin: 8px 14px;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.5px;
}

.search-form__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-form__item {
    margin: 0;
    padding: 0;
}

.search-form__link,
.search-form__girl-link {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
}

.search-form__link:hover,
.search-form__girl-link:hover {
    background-color: #f5f5f5;
    color: #F4551E;
}

.search-form__link:focus,
.search-form__girl-link:focus {
    outline: 2px solid #F4551E;
    outline-offset: -2px;
    background-color: #f5f5f5;
}

.search-form__count {
    margin-left: auto;
    font-size: 12px;
    color: #999;
}

.search-form__item--girl {
    padding: 0;
}

.search-form__girl-link {
    gap: 10px;
    padding: 8px 14px;
}

.search-form__girl-img {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-form__girl-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-form__no-results,
.search-form__error {
    padding: 16px 14px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.search-form__error {
    color: #d9534f;
}

/* Header Search (Desktop) */
.search-form--header {
    width: 250px;
}


.search-form--header .search-form__input::placeholder {
    color: rgb(180, 16, 16);
}



/* Mobile Search */
.search-form--mobile {
    margin-bottom: 16px;
}

.search-form--mobile .search-form__input {
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 16px;
}



.search-form--mobile .search-form__results {
    left: 16px;
    right: 16px;
    max-height: 400px;
}

/* Loading State */
.search-form__results[aria-busy="true"] {
    display: block;
}

.search-form__results[aria-busy="true"]::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    margin: 16px auto;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #F4551E;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .header-search-wrapper {
        display: none;
    }

    .search-form--header {
        width: 100%;
    }

    .search-form--mobile .search-form__results {
        max-height: 60vh;
    }
}

@media (min-width: 769px) {
    .sidebar-search-wrapper {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: more) {
    .search-form__input {
        border-width: 2px;
    }

    .search-form__link:hover,
    .search-form__girl-link:hover {
        border-left: 2px solid #F4551E;
        padding-left: 12px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .search-form__input,
    .search-form__link,
    .search-form__girl-link {
        transition: none;
    }

    @keyframes spin {
        0%, 100% { transform: rotate(0deg); }
    }
}
