.search-box {
    position: relative;
    display: block;
    width: min(550px, calc(100% - 32px));
    box-sizing: border-box;
}

.search-box input[type="text"] {
    padding: 10px 40px 10px 10px;
    border: 1px solid #212121;
    border-radius: 4px;
    width: 100%;
    height: 40px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.search-box input[type="text"]:focus {
    outline: none;
    border-color: #0052D5;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease;
    pointer-events: auto;
    touch-action: manipulation;
}

.search-icon:hover {
    color: #0052D5;
}

.search-box.loading input[type="text"] {
    opacity: 0.7;
}

.search-box.loading .search-icon {
    animation: hg-spin 1s linear infinite;
}

@keyframes hg-spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .search-box.loading .search-icon {
        animation: none;
    }
}

.search-box .error-message {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.search-box .error-message.show {
    display: block;
}
