.agent-selector-btn {
    padding: 5px;
    font-size: 12px;
    color: #232526;
    border-radius: 18px;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, .1);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.agent-selector-btn:hover {
    background: #e9ecef;
}

.agent-selector-btn .edit-icon,
.agent-selector-btn .agent-name,
.agent-selector-btn .icon-text {
    margin-right: 5px;
}

.dropdown-arrow {
    font-size: 10px;
    color: #666;
}

.select-agent-box {
    position: absolute;
    top: 35px;
    width: 200px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 1000;
}

.select-agent-box.position-top {
    top: auto;
    bottom: 35px;
}

.select-agent-header {
    padding: 2px 13px;
    font-weight: 600;
    color: #2c2c2c;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

/* Desktop List View */
.desktop-options {
    display: block;
}

.mobile-options {
    display: none;
}

.agent-option {
    display: flex;
    align-items: center;
    padding: 4px 13px;
    color: #2c2c2cbf;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.agent-option:hover {
    background: #f5f5f5;
}

.agent-option.active {
    background: #f0f7ff;
}

.infinity-icon, .chat-icon, .edit-icon, .icon-text {
    font-size: 18px;
    margin-right: 12px;
    width: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-text i {
   font-size: 13px;
}

.agent-name {
    flex-grow: 1;
}

.active-check {
    color: #0066ff;
    font-weight: bold;
    margin-left: auto;
    visibility: hidden;
}

.agent-option.active .active-check {
    visibility: visible;
}

/* Mobile Card View */
.agent-option-card {
    margin: 12px 16px;
    padding: 16px;
    border: 2px solid #e6e6e6;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.agent-option-card:hover {
    border-color: #007AFF;
    background: rgba(0, 122, 255, 0.02);
}

.agent-option-card.active {
    border-color: #007AFF;
    background: rgba(0, 122, 255, 0.05);
}

.agent-option-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.agent-option-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.agent-option-icon i {
    font-size: 24px;
    color: #666;
}

.agent-option-card.active .agent-option-icon {
    background: rgba(0, 122, 255, 0.1);
}

.agent-option-card.active .agent-option-icon i {
    color: #007AFF;
}

.agent-option-info {
    flex: 1;
    min-width: 0;
}

.agent-option-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.agent-option-description {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 8px;
}

.agent-option-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-handle {
    display: none;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .desktop-options {
        display: none;
    }
    
    .mobile-options {
        display: block;
    }
    
    .mobile-handle {
        display: block;
        width: 40px;
        height: 4px;
        background: #e0e0e0;
        border-radius: 2px;
        margin: 8px auto 16px;
    }

    .select-agent-box {
        position: fixed;
        bottom: -100%;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        min-width: 100%;
        max-height: 70vh;
        margin: 0;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        transition: bottom 0.3s ease-in-out;
        z-index: 1001;
        background: #f8f9fa;
        padding: 0;
        overflow-y: auto;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .select-agent-box.show {
        bottom: 0;
    }

    .select-agent-header {
        padding: 5px 5px 5px 20px;
        font-size: 18px;
        font-weight: 600;
        color: #1a1a1a;
        border-bottom: none;
        background: #f8f9fa;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    /* Dark mode styles */
    [data-theme="dark"] .select-agent-box {
        background: #1a1a1a;
    }

    [data-theme="dark"] .mobile-handle {
        background: #666;
    }

    [data-theme="dark"] .select-agent-header {
        color: #ffffff;
        background: #1a1a1a;
    }

    [data-theme="dark"] .agent-option-card {
        background: #2a2a2a;
        border-color: #404040;
    }

    [data-theme="dark"] .agent-option-card:hover {
        border-color: #007AFF;
        background: rgba(0, 122, 255, 0.1);
    }

    [data-theme="dark"] .agent-option-card.active {
        border-color: #007AFF;
        background: rgba(0, 122, 255, 0.15);
    }

    [data-theme="dark"] .agent-option-icon {
        background: #404040;
    }

    [data-theme="dark"] .agent-option-icon i {
        color: #ccc;
    }

    [data-theme="dark"] .agent-option-card.active .agent-option-icon {
        background: rgba(0, 122, 255, 0.2);
    }

    [data-theme="dark"] .agent-option-card.active .agent-option-icon i {
        color: #007AFF;
    }

    [data-theme="dark"] .agent-option-title {
        color: #ffffff;
    }

    [data-theme="dark"] .agent-option-description {
        color: #ccc;
    }

    [data-theme="dark"] .agent-option-badge {
        background: #404040;
        color: #ccc;
    }
}