/* 搜索自动补全样式 */
.search-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: -1px;
}

.search-autocomplete-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.search-autocomplete-item:last-child {
    border-bottom: none;
}

.search-autocomplete-item:hover,
.search-autocomplete-item.active {
    background-color: #f9fafb;
}

.search-autocomplete-item .item-icon {
    margin-right: 10px;
    font-size: 14px;
}

.search-autocomplete-item .item-text {
    flex: 1;
    color: #374151;
    font-size: 14px;
}

.search-autocomplete-item .item-text strong {
    color: #8b5cf6;
    font-weight: 600;
}

/* 加载动画 */
.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
}

.search-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 骨架屏样式 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-image {
    height: 100px;
    width: 100%;
    margin-bottom: 12px;
}

/* 加载按钮样式 */
.loading-btn {
    position: relative;
    pointer-events: none;
}

.loading-btn::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.loading-btn.loading::after {
    opacity: 1;
}

.loading-btn.loading {
    color: transparent !important;
}