/* Bot选择器样式 */
.bot-selector {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-size: 16px;
}

.dropbtn i {
    transition: transform 0.3s ease;
}

/* 网格式下拉内容 */
.bot-grid-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 480px; /* 减小最小宽度 */
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 16px;
    margin-top: 10px;
}

.bot-grid-dropdown.open {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-height: 600px;
    overflow-y: auto;
}

.bot-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px; /* 增加内边距 */
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: row;
    align-items: center;
    text-decoration: none;
    gap: 12px; /* 增加间距 */
    width: 200px;
}

.bot-card:hover {
    background: #fff;
    border-color: #feb565;
    transform: translateY(-2px);
}

.bot-card.active {
    background: #fff;
    border-color: #feb565;
}

.bot-card-avatar {
    width: 44px; /* 增大图片尺寸 */
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f0 url('../images/user.png') center/cover no-repeat;
}

.bot-card-info {
    flex: 1;
    min-width: 0;
}

.bot-card-name {
    font-size: 16px; /* 增大字体 */
    font-weight: 500;
    color: #333;
    margin: 0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 移动端适配 */
@media screen and (max-width: 576px) {
    .bot-selector {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        justify-content: center;
        align-items: center;
        width: auto;
        z-index: 1;
    }

    .dropbtn {
        justify-content: center;
        padding: 10px 15px;
        white-space: nowrap;
        font-size: 17px;
    }

    .bot-grid-dropdown {
        min-width: 320px;
        width: 95vw;
        max-width: 400px;
        left: 50%;
        transform: translateX(-50%);
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin-top: 0; /* 移除移动端的顶部间距 */
    }

    .bot-grid-dropdown.open {
        grid-template-columns: repeat(2, 1fr); /* 改为两列 */
        gap: 10px;
        padding: 12px;
        max-height: 70vh; /* 确保打开状态也有最大高度限制 */
        overflow-y: auto;
    }

    .bot-card {
        width: auto;
        padding: 10px; /* 调整移动端内边距 */
        min-width: 0;
    }

    .bot-card-name {
        font-size: 14px; /* 调整移动端字体大小 */
    }

    .bot-card-avatar {
        width: 36px; /* 调整移动端图片尺寸 */
        height: 36px;
        border-radius: 5px;
        background: #f0f0f0 url('../images/user.png') center/cover no-repeat;
    }
} 