/* 搜索框组件样式 */
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: visible;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    position: relative;
    flex: 1;
    min-width: 300px;
}


.search-input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #333;
    background: transparent;
    border-radius: 0;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
    border-radius: 0 50px 50px 0;
}

.search-btn:hover {
    background: #0056b3;
}

.search-icon {
    width: 20px;
    height: 20px;
}

/* 角色分类下拉框样式 */
.role-category-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-trigger {
    background: transparent;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 1rem;
    transition: color 0.3s ease;
    white-space: nowrap;
    outline: none;
    border-radius: 50px 0 0 50px;
}

.dropdown-trigger:hover {
    color: #007bff;
}

.dropdown-text {
    font-weight: 500;
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

/* 移除悬停时的图标旋转，只在active状态下旋转 */

.search-divider {
    width: 1px;
    align-self: stretch;
    background: linear-gradient(to bottom,
    rgba(224, 224, 224, 0.3) 0%,
    rgba(224, 224, 224, 0.8) 20%,
    rgba(224, 224, 224, 1) 50%,
    rgba(224, 224, 224, 0.8) 80%,
    rgba(224, 224, 224, 0.3) 100%);
    margin: 10px 0;
    position: relative;
    border-radius: 0.5px;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    margin-top: 12px;
    display: none;
    border: 1px solid rgba(0, 123, 255, 0.1);
    overflow: hidden;
}

/* 下拉框显示状态 */
.role-category-dropdown.active ~ .dropdown-content {
    display: block;
}

.role-category-dropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

.category-link {
    color: #409eff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    flex-shrink: 0;
}

.category-link:hover {
    color: #66b1ff;
    background: rgba(64, 158, 255, 0.1);
    transform: none;
}

.category-link:active {
    color: #3a8ee6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-input {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .search-btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    .category-link {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .dropdown-trigger {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .dropdown-content {
        min-width: 180px;
    }
}

@media (max-width: 600px) {
    .search-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .search-box {
        max-width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .search-input {
        padding: 10px 15px;
    }

    .search-btn {
        padding: 10px 20px;
    }

    .category-link {
        padding: 10px 15px;
    }

    .dropdown-trigger {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .search-divider {
        height: 25px;
    }

    .dropdown-content {
        min-width: 160px;
    }
}

.dropdown-placeholder {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 角色分类分组样式 */
.category-groups {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(0, 123, 255, 0.1);
    background: #f8f9fa;
    padding: 10px 15px;
    gap: 8px;
}


.group-item {
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    background: white;
    border: 1px solid #ddd;
    white-space: nowrap;
    flex-shrink: 0;
}

.group-item:hover {
    background: #e9ecef;
    color: #007bff;
    border-color: #007bff;
}

.group-item.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* 角色列表样式 */
.role-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px 0;
}

.role-group {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 15px;
}

.role-item {
    background: none;
    border: none;
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.role-item:hover {
    color: #0056b3;
    background-color: rgba(0, 123, 255, 0.1);
    text-decoration: underline;
}

.role-item:last-child {
    border-bottom: none;
}

.role-item span {
    flex: 1;
}

/* 滚动条样式优化 */
.role-list::-webkit-scrollbar {
    width: 6px;
}

.role-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.role-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.role-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}